Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feat]: Custom logging format in code-server #5330

Open
Coding-Crashkurse opened this issue Jul 11, 2022 · 5 comments
Open

[Feat]: Custom logging format in code-server #5330

Coding-Crashkurse opened this issue Jul 11, 2022 · 5 comments
Labels
enhancement Some improvement that isn't a feature
Milestone

Comments

@Coding-Crashkurse
Copy link

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

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?

@Coding-Crashkurse Coding-Crashkurse added the enhancement Some improvement that isn't a feature label Jul 11, 2022
@jsjoeio
Copy link
Contributor

jsjoeio commented Jul 18, 2022

Hmm...I don't think there are workarounds. Is your company using Coder or is this some custom setup?

@code-asher what are your thoughts?

@Coding-Crashkurse
Copy link
Author

We use the normal code-server inside a container

@jsjoeio jsjoeio added this to the Backlog milestone Jul 19, 2022
@code-asher
Copy link
Member

Apologies if this ends up being a duplicate post; I initially responded from email but it seems to have vanished into the void. Here is what I wrote:

There is no way to achieve this currently but it would be pretty trivial to
implement. I think the main question would just be how exactly we want to
implement it.

@jsjoeio jsjoeio modified the milestones: Backlog, On Deck Jul 21, 2022
@code-asher
Copy link
Member

code-asher commented Oct 11, 2022 via email

@code-asher
Copy link
Member

Wow my comment showed up almost three months later. ⌛

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Some improvement that isn't a feature
Projects
None yet
Development

No branches or pull requests

3 participants