* refactor(logger): improve logger format * chore: improve log format * feat(logger): plugin-logger * feat: allow to download log files, close T-1917 * chore: update yarn.lock * chore: improve log format * fix: add maxsize params * chore: add userId field to request * chore: remove userId from request * chore: change userId in response * chore: change action in response * chore: add database logger * fix: build * fix: test * chore: solve conflicts * fix: escape delimiter in message * refactor: improve create logger api * chore: update app logger options * chore: remove colorize for json * fix: bug of data2tree * fix: test * chore: log * chore: remove GITHUB_ACTION check * fix: bug * chore: change version * fix: transports * fix: mockServer * chore: use new plugin settings api * fix: version * fix: build * feat: support logfmt * fix: build * fix: build * fix: test * chore: update config * fix: test * fix: bug * fix: test * fix: format * chore: update path * fix: build * fix: bug * chore: update comment * fix: allow to custom format * fix: package.json * fix: version * fix: bug
23 lines
521 B
TypeScript
23 lines
521 B
TypeScript
import { Plugin } from '@nocobase/client';
|
|
import { lang } from './locale';
|
|
import { LogsDownloader } from './LogsDownloader';
|
|
|
|
export class PluginLoggerClient extends Plugin {
|
|
async afterAdd() {
|
|
// await this.app.pm.add()
|
|
}
|
|
|
|
async beforeLoad() {}
|
|
|
|
// You can get and modify the app instance here
|
|
async load() {
|
|
this.app.pluginSettingsManager.add('logger', {
|
|
title: lang('Logger'),
|
|
icon: 'FileTextOutlined',
|
|
Component: LogsDownloader,
|
|
});
|
|
}
|
|
}
|
|
|
|
export default PluginLoggerClient;
|