Documentation
¶
Overview ¶
* @Author: nijineko * @Date: 2025-06-10 12:57:28 * @LastEditTime: 2025-06-10 23:02:39 * @LastEditors: nijineko * @Description: noa json log encoder * @FilePath: \noa-encoder-json\jsonEncoder.go
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ErrorLog ¶
type ErrorLog struct {
Message string `json:"message"`
StackFrames []ErrorLogStackFrame `json:"stack_frames,omitempty"`
}
error log format
type ErrorLogStackFrame ¶
type ErrorLogStackFrame struct {
Function string `json:"function"`
File string `json:"file"`
Line int `json:"line"`
PackageName string `json:"package_name"`
FunctionName string `json:"function_name"`
}
error log stack frame format
type JSONEncoder ¶
JSONEncoder struct
func NewJSONEncoder ¶
func NewJSONEncoder(Log *noa.LogConfig) *JSONEncoder
*
- @description: Create a new JSONEncoder instance
- @param {noa.LogConfig} Log noa log instance
- @return {*JSONEncoder} JSONEncoder instance
func (*JSONEncoder) FileExtension ¶
func (e *JSONEncoder) FileExtension() string
*
- @description: Get file extension for the encoded file
- @return {string} file extension
func (*JSONEncoder) WriteFileExtension ¶
func (je *JSONEncoder) WriteFileExtension() string
return file extension for the encoded file
Click to show internal directories.
Click to hide internal directories.