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

[BUG] If the channel capacity exceeds 1M, it is not recorded. #2194

Closed
aceamro opened this issue Sep 13, 2020 · 4 comments
Closed

[BUG] If the channel capacity exceeds 1M, it is not recorded. #2194

aceamro opened this issue Sep 13, 2020 · 4 comments
Labels
bug An actual error or unwanted behavior.

Comments

@aceamro
Copy link

aceamro commented Sep 13, 2020

Describe the bug

If the channel capacity exceeds 1M, it is not recorded.

To Reproduce

Steps to reproduce the behavior:

  1. evennia --init mygame
  2. cd mygame
  3. evennia migrate
  4. evennia start -l
  5. <create Incorrect value of ansi['return'] in ansi.py #1 and login Incorrect value of ansi['return'] in ansi.py #1>
  6. pub hi
  7. shutdown
  8. cd server/logs
  9. (edit channel_Public.log) -> make file size 1MG
  10. evennia start -l
  11. <login Incorrect value of ansi['return'] in ansi.py #1 >
  12. pub hi
  13. <server log printing 20-09-13 01:53:17 [::] NoneType: None>

스크린샷 2020-09-13 오전 10 59 58

Environment, Evennia version, OS etc

Evennia 0.9.0 (rev 8046f78b9) (rev 8046f78b9)
OS: posix
Python: 3.8.5
Twisted: 20.3.0
Django: 2.2.14
@aceamro aceamro added the bug An actual error or unwanted behavior. label Sep 13, 2020
@aceamro
Copy link
Author

aceamro commented Sep 13, 2020

channel_잡담.log
my test file

@ChanceNCounter
Copy link

Hi! I'm just poking around Hacktoberfest-tagged repos, so I'm not familiar enough with your codebase to diagnose, but I thought I should mention that the parent class, Twisted's logfile, the default rotateLength is 1M. That seems like a pretty big coincidence, and it looks like you're overriding the rotation logic, so I'd look in there.

Might go without saying, but you never know!

@Griatch
Copy link
Member

Griatch commented Nov 13, 2020

@aceamro I can't reproduce the None being echoed to the server log, but after analyzing this, the example here is not representable. The reason is that if you add 1MB of data 'externally' (by adding lines of text to the log file manually), it will not be counted by the logger - it counts by simply adding to a number when you write, so it can't know about the externally added file size.
Whenever you reload the server, it reads the file size and at that point it rotates the log file correctly (for me). So at this point I can't reproduce any issue here, and the way to reproduce is not representative of actual functionality. Closing this, we can open again if it shown that this appears in actual normal usage.

@Griatch Griatch closed this as completed Nov 13, 2020
@Griatch
Copy link
Member

Griatch commented Nov 13, 2020

@ChanceNCounter Thanks for the input - yes, if there is an issue, it's very likely to be related to the log-rotation. But as seen above, at least at this time the issue is not reproducible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An actual error or unwanted behavior.
Projects
None yet
Development

No branches or pull requests

3 participants