- Add full Telegram bot functionality with Z.AI API integration
- Implement 4 tools: Bash, FileEdit, WebSearch, Git
- Add 3 agents: Code Reviewer, Architect, DevOps Engineer
- Add 6 skills for common coding tasks
- Add systemd service file for 24/7 operation
- Add nginx configuration for HTTPS webhook
- Add comprehensive documentation
- Implement WebSocket server for real-time updates
- Add logging system with Winston
- Add environment validation
🤖 zCode CLI X - Agentic coder with Z.AI + Telegram integration
43 lines
1.3 KiB
JavaScript
43 lines
1.3 KiB
JavaScript
/*
|
|
* Copyright The OpenTelemetry Authors
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
import { getGlobal } from '../internal/global-utils';
|
|
/**
|
|
* Component Logger which is meant to be used as part of any component which
|
|
* will add automatically additional namespace in front of the log message.
|
|
* It will then forward all message to global diag logger
|
|
* @example
|
|
* const cLogger = diag.createComponentLogger({ namespace: '@opentelemetry/instrumentation-http' });
|
|
* cLogger.debug('test');
|
|
* // @opentelemetry/instrumentation-http test
|
|
*/
|
|
export class DiagComponentLogger {
|
|
constructor(props) {
|
|
this._namespace = props.namespace || 'DiagComponentLogger';
|
|
}
|
|
debug(...args) {
|
|
return logProxy('debug', this._namespace, args);
|
|
}
|
|
error(...args) {
|
|
return logProxy('error', this._namespace, args);
|
|
}
|
|
info(...args) {
|
|
return logProxy('info', this._namespace, args);
|
|
}
|
|
warn(...args) {
|
|
return logProxy('warn', this._namespace, args);
|
|
}
|
|
verbose(...args) {
|
|
return logProxy('verbose', this._namespace, args);
|
|
}
|
|
}
|
|
function logProxy(funcName, namespace, args) {
|
|
const logger = getGlobal('diag');
|
|
// shortcut if logger not set
|
|
if (!logger) {
|
|
return;
|
|
}
|
|
return logger[funcName](namespace, ...args);
|
|
}
|
|
//# sourceMappingURL=ComponentLogger.js.map
|