Comments (4)
I think the main issue here is that printf
is complex and submits to out in parts but the OutputLogger is naive (or stupid depending on how you feel about it) and thinks that the message is "a different one" for each of its segments because its logic is very basic and therefore requires a timestamp.
Also, your usage of printf is confusing. Using a different example with proper args (System.out.printf("%s Test.", System.currentTimeMillis());
3 times) creates 2024/05/11 22:13:21 | 17154620014562024/05/11 22:13:21 | Test.2024/05/11 22:13:21 | 17154620014672024/05/11 22:13:21 | Test.2024/05/11 22:13:21 | 17154620014672024/05/11 22:13:21 | Test.
(you can clearly see it timestamping every "split" in the format)
I do have a potential solution in mind to mitigate this and am working on it right now
from gigavibe-java-edition.
Also, your usage of printf is confusing.
I realized later that I should've probably used it as I intended to use it, but I think my thought process must've been to simply showcase that any printf
is faulty. My bad.
from gigavibe-java-edition.
The new version (3733765) will now stop adding timestamps onto prints that dont terminate in newlines. Newlines that are part of the same print (and that get received by the logger in the same byte array, aka not printf
's %n) will continue to only be timestamped at the start of the entire string (e.g. println("a\na\na")
), which isn't great and this should probably be improved, but is no different from the old behaviour and is different to this specific bug
from gigavibe-java-edition.
I've improved it further with 3a9a7ca (in functionality, the code itself looks a bit bad) to fix the behaviour I describe in my above comment. If there's any further issues (or new ones caused by this change that I haven't spotted), feel free to re-open this issue
from gigavibe-java-edition.
Related Issues (20)
- Log errors aren't perfectly timestamp formatted HOT 2
- Autoplay is still not great HOT 1
- Queue's button interaction doesn't check if the queue has at least one item
- Make IsDJ and other checks use reply instead of sendMessageEmbeds HOT 1
- Add queue recovery system HOT 1
- Unresolved questions from system revamp HOT 1
- Create ShardManager
- Look into threading command execution HOT 1
- Playing multiple playlists at once embeds multiple times.
- The play command can cause a concurrent modification exception HOT 3
- fix (or improve) mention prefix logic
- playback of txt url fails HOT 3
- Add "played by:" footer text
- suppress permission warnings from logs and console. HOT 1
- using play command without args connects the bot to the vc. HOT 1
- queue restoration fails when running from a jar
- rewrite onTrackEnd
- rewrite commandDJ
- Create inline documentation for PlayerManager
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gigavibe-java-edition.