{"action":"created","issue":{"url":"https://api.github.com/repos/guangie88/spdlog_setup/issues/12","repository_url":"https://api.github.com/repos/guangie88/spdlog_setup","labels_url":"https://api.github.com/repos/guangie88/spdlog_setup/issues/12/labels{/name}","comments_url":"https://api.github.com/repos/guangie88/spdlog_setup/issues/12/comments","events_url":"https://api.github.com/repos/guangie88/spdlog_setup/issues/12/events","html_url":"https://github.com/guangie88/spdlog_setup/issues/12","id":301148674,"number":12,"title":"Save Modified Config File","user":{"login":"p0fi","id":6141293,"avatar_url":"https://avatars1.githubusercontent.com/u/6141293?v=4","gravatar_id":"","url":"https://api.github.com/users/p0fi","html_url":"https://github.com/p0fi","followers_url":"https://api.github.com/users/p0fi/followers","following_url":"https://api.github.com/users/p0fi/following{/other_user}","gists_url":"https://api.github.com/users/p0fi/gists{/gist_id}","starred_url":"https://api.github.com/users/p0fi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/p0fi/subscriptions","organizations_url":"https://api.github.com/users/p0fi/orgs","repos_url":"https://api.github.com/users/p0fi/repos","events_url":"https://api.github.com/users/p0fi/events{/privacy}","received_events_url":"https://api.github.com/users/p0fi/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-02-28T19:18:06Z","updated_at":"2018-03-01T13:24:10Z","closed_at":null,"author_association":"NONE","body":"Hi,\r\n\r\nI came over from the original spdlog repo after I found this **awesome** extension for spdlog. After the removal of the dependencies its really much leaner and I am planning to use this in our production software. I extended spdlog myself before in a similar way, making it possible to load only log levels from a file. Being able to fully setup the loggers and sinks via config file is a very good improvement. The only thing my implementation provided which is missing now is the option to permanently change the config during runtime. Do you think a option like this could be implemented here also?\r\n\r\nI could imagine a solution wich looks like this:\r\n\r\n* The `default_config.toml` is never touched\r\n* If the user modifies the log level during runtime and wants this change to persist he can save this.\r\n* A new `custom_config.toml` is created and saved to disc. \r\n* When the program starts and tries to load the `default_config.toml` it looks for a `custom_config.toml` and prefers this over the `default_config.toml` if found.\r\n* The user can also reset to `default_config.toml` at any time and the `custom_config.toml` is deleted. \r\n* A restart of the program would now load the `default_config.toml` since it cant find any other.\r\n\r\nHow do you think? Could you imagine such a feature?\r\n\r\nCheers!"},"comment":{"url":"https://api.github.com/repos/guangie88/spdlog_setup/issues/comments/369590101","html_url":"https://github.com/guangie88/spdlog_setup/issues/12#issuecomment-369590101","issue_url":"https://api.github.com/repos/guangie88/spdlog_setup/issues/12","id":369590101,"user":{"login":"guangie88","id":557766,"avatar_url":"https://avatars2.githubusercontent.com/u/557766?v=4","gravatar_id":"","url":"https://api.github.com/users/guangie88","html_url":"https://github.com/guangie88","followers_url":"https://api.github.com/users/guangie88/followers","following_url":"https://api.github.com/users/guangie88/following{/other_user}","gists_url":"https://api.github.com/users/guangie88/gists{/gist_id}","starred_url":"https://api.github.com/users/guangie88/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guangie88/subscriptions","organizations_url":"https://api.github.com/users/guangie88/orgs","repos_url":"https://api.github.com/users/guangie88/repos","events_url":"https://api.github.com/users/guangie88/events{/privacy}","received_events_url":"https://api.github.com/users/guangie88/received_events","type":"User","site_admin":false},"created_at":"2018-03-01T13:24:10Z","updated_at":"2018-03-01T13:24:10Z","author_association":"OWNER","body":"I am afraid I would have to decline your proposed suggestion; `spdlog` API has an extensive range of `setter` public methods, but very few `getter` methods (seems like only the name and level of a known logger can be retrieved). It would be impossible to properly implement your idea of persisting the registry of loggers (plus sinks and formatters) without the necessary `getter` methods, and at the same time I do not have control over the public `getter` methods required.\r\n\r\nMy apologies and I hope you can accept the explanation."}}
{"actor":{"display_login":"guangie88"}}