[KED-1258] Allow logging directory to be specified
See original GitHub issueDescription
It is very jarring for kedro to change directories on its users. It appears that this is done for logging purposes. Is there a way to specify the logging directory without changing the users directory? This is possibly related to #149.
Context
It is very confusing to have a side effect of changing directories after running a function. This behavior is not typical with other python frameworks/libraries that I am familiar with.
Possible Implementation
set the logging directory and remove the os.chdir
line.
logging.basicConfig(filename=str(project_path / log_filename), filemode='w')
Possible Alternatives
My project templates track the user’s directory and changes it back to where the user intended to be. This works, but is less desirable.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:5 (4 by maintainers)
Top Results From Across the Web
[KED-1258] Allow logging directory to be specified · Issue #161
Description It is very jarring for kedro to change directories on its users. It appears that this is done for logging purposes. Is...
Read more >JR46994: Allow alternative client log directory to be specified ...
Apply patch JR46994 which allows users to specify alternative log directory by specifying the path to the field "xmlui.logging.
Read more >Chapter 7. Log File Reference Red Hat Directory Server 11
The access logs have different levels of logging, set in the nsslapd-accesslog-level attribute. The following sections provide an overview of the default ...
Read more >Default Log File Settings for Web Sites <logFile> - IIS
For example, you can enable or disable logging, configure the format of the IIS log file, specify the categories of information to store...
Read more >Changing the directory where log files are located - TechDocs
box, type the path to the new location for the log files. The file directory that you specify must already exist. Symantec Protection...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Great Work!!! Excited to see this in the next version. We have a quick hack implemented on our pipelines that simply saves the current directory, loads context, then changes back to where the user was.
It might be good to update
run.py
from the template to not rely on the user’s current working directory.https://github.com/quantumblacklabs/kedro/blob/develop/kedro/template/{{ cookiecutter.repo_name }}/src/{{ cookiecutter.python_package }}/run.py#L54
Great shout. Will definite make that change.