Logging doesn't display the last log statement.
See original GitHub issuewhen calling logger.<level>(‘message’); the last line you log doesn’t appear in the output.
import { Listr, Logger } from 'listr2';
new Listr({
title: 'this task',
task: () => {
const logger = new Logger({ useIcons: true });
logger.start('hello there!');
logger.data('testing 123');
},
})
.run()
.then(() => console.log('done'));
output
⠋ this task
❯ hello there!
✔ this task
done
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
Python logging not outputting anything - Stack Overflow
I defined in a separate script a simple function that does both actions above (setting the logging level to info and the formatting...
Read more >Logging HOWTO — Python 3.11.1 documentation
Displaying the date/time in messages To display the date and time of an event, you would place '%(asctime)s' in your format string: import...
Read more >Why Are Some Logging Messages Missing in Python? - jdhao
Missing log message. This works well when I show info messages. Later, I want to show some debug messages via my logger.
Read more >How to Get Started with Logging in Python - Better Stack
In the example above, we've imported the logging module, and we're using two of its methods: info() and warning() . Copied!
Read more >Python Logging: A Stroll Through the Source Code
When you log a message, an instance of the LogRecord class is the object you send to be logged. It's created for you...
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 Free
Top 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
Anyways in the example you have provided, it will just show it momentarily then collapse it off.
But it will always have the latest output, so the idea here is to not have proper logging but have something to show the user what the current status of that action is.