coder / coder/code-server

[Feat]: Custom logging format in code-server

未关闭
#5,330 5 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
enhancement
主要语言
TypeScript
星标
79.3k
派生
6.8k
平均合并
2 天 6 小时
30 天内合并 PR
41

描述

## What is your suggestion?
My company needs to log messages in a JSON-Format and at minimum the current timestamp and the log message. We use code-server together with JupyterLab, so the logs look like this (in Python, changing the log-format is easy)

![grafik](https://user-images.githubusercontent.com/64363987/178288358-a6b13f01-863a-45d3-b294-a8897c0d5360.png)

## Why do you want this feature?
Getting common logs is required the in the company due to compliance reasons. I would ideally set it like this:

code-server --log-format='%(filename)s: ', '%(levelname)s: ', '%(funcName)s(): ','%(lineno)d:\t', '%(message)s')

## Are there any workarounds to get this functionality today?
Are there? As far as I know I can only get the log level but I have seen code-server uses @coder/logger which has to capability to extend the formatter (https://www.npmjs.com/package/@coder/logger).

Have you ever received a request like this or is there even a workaround to archieve this?

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。