# README
Pydio LOG
Pydio relies on zap logging framework.
We mainly use 2 loggers that are defined in this package and used throughout the backend:
- A syslog logger: it should be used to log technical information.
- An audit logger: it only logs some very precise information at strategic places and is used to monitor the Application from a business point of view. Audit logs are among others used for GRDP compliance.
WARNING: you should not modify nor remove any of the audit log.
Guidelines
- When enriching the log with zap fields, always use constants from
common/zapfields.go
as keys, otherwise the logs won't be usable for analysis - Pydio provides some shortcuts to easily generate zap fields for commons pydio objects. Typically when loging info about a tree.Node, one should write:
...Debug("A message", node.Zap())
- Depending on the level of details required, one can either use
Zap()
that serializes all accessible information orZapPath()
,ZapUuid()
orZapId()
(depending on the relevant info) that simply calls zap.String() with relevant pydio zap id (as seen in common/zapfields.go) and corresponding value.
Conventions
- it is idiomatic in Go to write error message that start with a lower case letter and do not end with a punctuation mark.
# Packages
No description provided by the author
# Functions
Auditer returns a zap logger with as much context as possible.
DangerouslyZapSmallSlice is a simple clone for zap.Any, allowing the linter to consider the slice zap as legitimate.
No description provided by the author
No description provided by the author
No description provided by the author
GetAuditId simply returns a zap field that contains this message id to ease audit log analysis.
No description provided by the author
Init for the log package - called by the main.
Logger returns a zap logger with as much context as possible.
No description provided by the author
RegisterConsoleNamedColor allows external registration of colors based on Logger Name.
RegisterWriteSyncer optional writers for logs.
RFC3369TimeEncoder serializes a time.Time to an RFC3339-formatted string.
SetAuditerInit defines what function to use to init the auditer.
SetLoggerInit defines what function to use to init the logger.
SetSkipServerSync can disable the core syncing to cells service Must be called before initialization.
SetTasksLoggerInit defines what function to use to init the tasks logger.
TasksLogger returns a zap logger with as much context as possible.
No description provided by the author
# Constants
No description provided by the author
No description provided by the author
No description provided by the author
# Interfaces
WriteSyncer implements zapcore.WriteSyncer.
# Type aliases
No description provided by the author