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: add logging to file #166

Merged
merged 8 commits into from
Jul 23, 2024
Merged

feat: add logging to file #166

merged 8 commits into from
Jul 23, 2024

Conversation

Robitx
Copy link
Owner

@Robitx Robitx commented Jul 23, 2024

@teto happy?

lua/gp/config.lua Outdated Show resolved Hide resolved
lua/gp/logger.lua Outdated Show resolved Hide resolved
@teto
Copy link
Collaborator

teto commented Jul 23, 2024

I will try to run this to test it

@Robitx Robitx requested a review from teto July 23, 2024 21:30
@Robitx Robitx marked this pull request as ready for review July 23, 2024 21:31
@Robitx
Copy link
Owner Author

Robitx commented Jul 23, 2024

@teto logging logic works fine on my end, will merge and go to sleep

tail -f ~/.local/state/nvim/gp.nvim.log
[2024-07-23 23:52:02] [eaa98ca2] DEBUG: New neovim instance [eaa98ca2] started, setting log file to /home/tibor/.local/state/nvim/gp.nvim.log
[2024-07-23 23:52:30] [eaa98ca2] WARNING: Can't close the last window.
[2024-07-23 23:52:41] [95098cc9] DEBUG: New neovim instance [95098cc9] started, setting log file to /home/tibor/.local/state/nvim/gp.nvim.log
[2024-07-23 23:52:45] [95098cc9] INFO:  Chat agent: MyCustomAgent  |  Command agent: CodeGPT4o

@Robitx Robitx merged commit 33812a6 into main Jul 23, 2024
1 check passed
@teto teto deleted the logger branch July 24, 2024 08:30
@teto
Copy link
Collaborator

teto commented Jul 24, 2024

I see twice the same message which is strange ?

[2024-07-24 10:33:00] [a1ba22dd] DEBUG: New neovim instance [a1ba22dd] started, setting log file to /home/teto/.local/state/nvim/gp.nvim.log
[2024-07-24 10:33:01] [2d1b22de] DEBUG: New neovim instance [2d1b22de] started, setting log file to /home/teto/.local/state/nvim/gp.nvim.log
[2024-07-24 10:33:00] [a1ba22dd] DEBUG: New neovim instance [a1ba22dd] started, setting log file to /home/teto/.local/state/nvim/gp.nvim.log
[2024-07-24 10:33:01] [2d1b22de] DEBUG: New neovim instance [2d1b22de] started, setting log file to /home/teto/.local/state/nvim/gp.nvim.log

@Robitx
Copy link
Owner Author

Robitx commented Jul 24, 2024

@teto that's weird, do you see it twice in _log_history when you check :GpInspectPlugin?

@teto
Copy link
Collaborator

teto commented Jul 24, 2024

no. Hum that might be due to how I initialize gp.nvim so forget about it. I want to get rid of the setup function (at least make the plugin usable without it). See https://mrcjkb.dev/posts/2023-08-22-setup.html for reasons.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants