Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
sagemathinc
GitHub Repository: sagemathinc/cocalc
Path: blob/master/src/packages/project/logger.ts
1447 views
1
/*
2
* This file is part of CoCalc: Copyright © 2021 Sagemath, Inc.
3
* License: MS-RSL – see LICENSE.md for details
4
*/
5
6
/*
7
Logger for a CoCalc project
8
9
The logger in packages/hub uses this one as well, but with some minor configuration changes.
10
11
Use this one throuout the project, since it automatically prefixes all log messages with "cocalc:project:"
12
*/
13
14
import { getLogger as getLoggerMain } from "@cocalc/backend/logger";
15
16
const rootLogger = getLoggerMain("project");
17
18
export default function getLogger(name: string) {
19
return rootLogger.extend(name);
20
}
21
22
export { getLogger };
23
24