mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
utils: use reggol for logging
This commit is contained in:
1 parent
5b7067d77d
commit
ab933bc9d5
7 files changed
+12
-97
No files matched your search
@@ -13,7 +13,7 @@ import cac from 'cac';
|
||||
import './ui';
|
||||
|
||||
import { Logger } from './logger';
|
||||
import { ApiMixin, Context } from './context';
|
||||
import { Context } from './context';
|
||||
// eslint-disable-next-line import/no-duplicates
|
||||
import { unwrapExports } from './utils';
|
||||
// This is the main entry. So let's re-export some modules.
|
||||
@@ -118,7 +118,6 @@ export function addScript(name: string, description: string) {
|
||||
}
|
||||
|
||||
Context.service('loader');
|
||||
app.api = new ApiMixin(app);
|
||||
const loader = new Loader();
|
||||
app.loader = loader;
|
||||
loader.app = app;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Logger } from '@hydrooj/utils/lib/logger';
|
||||
export { Logger } from '@hydrooj/utils/lib/logger';
|
||||
import { Logger } from '@hydrooj/utils/lib/utils';
|
||||
export { Logger } from '@hydrooj/utils/lib/utils';
|
||||
|
||||
global.Hydro.Logger = Logger;
|
||||
export const logger = new Logger('*');
|
||||
|
||||
@@ -72,7 +72,7 @@ export default class Watcher extends Service {
|
||||
}
|
||||
});
|
||||
this.watcher.on('unlink', (path) => {
|
||||
logger.debug('change detected: ', `-${relative(this.root, path)}`);
|
||||
logger.debug('change detected:', `-${relative(this.root, path)}`);
|
||||
bus.emit('app/watch/unlink', path);
|
||||
});
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user