CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
sagemathinc

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.

GitHub Repository: sagemathinc/cocalc
Path: blob/master/src/packages/project/logger.ts
Views: 687
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