mattermost-community-enterp.../public/pluginapi/log.go
Claude ec1f89217a Merge: Complete Mattermost Server with Community Enterprise
Full Mattermost server source with integrated Community Enterprise features.
Includes vendor directory for offline/air-gapped builds.

Structure:
- enterprise-impl/: Enterprise feature implementations
- enterprise-community/: Init files that register implementations
- enterprise/: Bridge imports (community_imports.go)
- vendor/: All dependencies for offline builds

Build (online):
  go build ./cmd/mattermost

Build (offline/air-gapped):
  go build -mod=vendor ./cmd/mattermost

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-17 23:59:07 +09:00

34 lines
1.2 KiB
Go

package pluginapi
import (
"github.com/mattermost/mattermost/server/public/plugin"
)
// LogService exposes methods to log to the Mattermost server log.
//
// Note that standard error is automatically sent to the Mattermost server log, and standard
// output is redirected to standard error. This service enables optional structured logging.
type LogService struct {
api plugin.API
}
// Error logs an error message, optionally structured with alternating key, value parameters.
func (l *LogService) Error(message string, keyValuePairs ...any) {
l.api.LogError(message, keyValuePairs...)
}
// Warn logs an error message, optionally structured with alternating key, value parameters.
func (l *LogService) Warn(message string, keyValuePairs ...any) {
l.api.LogWarn(message, keyValuePairs...)
}
// Info logs an error message, optionally structured with alternating key, value parameters.
func (l *LogService) Info(message string, keyValuePairs ...any) {
l.api.LogInfo(message, keyValuePairs...)
}
// Debug logs an error message, optionally structured with alternating key, value parameters.
func (l *LogService) Debug(message string, keyValuePairs ...any) {
l.api.LogDebug(message, keyValuePairs...)
}