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

Project - log file destination might need to be changed #357

Open
0xc0170 opened this issue Mar 2, 2016 · 0 comments
Open

Project - log file destination might need to be changed #357

0xc0170 opened this issue Mar 2, 2016 · 0 comments

Comments

@0xc0170
Copy link
Member

0xc0170 commented Mar 2, 2016

I faced a problem when progen was used by another module, invoked from root which was readonly, and debug logging was enabled. This caused the code snippet below to fail:

            if logger.isEnabledFor(logging.DEBUG):
                dump_data = {}
                dump_data['common'] = self.project['common']
                dump_data['tool_specific'] = self.project['tool_specific']
                dump_data['merged'] = self.project['export']
                handler = logging.FileHandler(os.path.join(os.getcwd(), "%s.log" % self.name),"w", encoding=None, delay="true")
                handler.setLevel(logging.DEBUG)
                logger.addHandler(handler)
                logger.debug("\n" + yaml.dump(dump_data))

We might consider changing the destination directory for logs. In this phase, the output dir is known, and should be writeable as we generate files there. The log could be generate to the generated folder.

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

No branches or pull requests

1 participant