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

add stack trace to log #5

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

llCorvinSll
Copy link

#4 and console output improvements


/**
* Simple layout, that formats logs as
* "{time} {level} [{tag}] - {message}"
*/
export default class BasicLayout implements ILayout {
format(entry:LogEntry):string {
return this.formatDate(entry.time) + ' ' + logLevelToString(entry.level) + ' [' + entry.tag + '] - ' + entry.message;
format(entry:LogEntry, include_data: boolean):string {
Copy link
Owner

@koroandr koroandr Jul 21, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The idea was to keep API simple and mimic the log4j and others. I think, passing some flags (especially when they lead us to repeating code in formatData) is not a good idea.

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