34 Commits

Author SHA1 Message Date
Dylan K. Taylor
3fdbcee10f Add some typehints and documentation to MainLogger 2017-08-06 11:43:42 +01:00
Dylan K. Taylor
4e9af1ac45 Fixed several extremely stupid bugs in MainLogger
- Fixed log writes being blocking (these were executed on a thread, but IN A SYNCHRONIZED BLOCK - what the fuck shoghi?!)
- Fixed log file being open for reading as well as writing
- The logger will now be buffered for 25ms before writing to disk, as it should have been to begin with.
- Moved the log resource to a local variable (it's unsafe to try to access resources from different threads, this takes away the ability to do so)
- Fixed line endings to use PHP_EOL instead of hardcoded LF, fix viewing logs in Notepadi
2017-08-06 10:56:39 +01:00
Dylan K. Taylor
475066c9f5 Removed minor code duplication in MainLogger 2017-08-06 08:55:46 +01:00
Dylan K. Taylor
dbb92096e4 More typehints, documentation fixes and static analysis cleanup 2017-07-15 12:12:06 +01:00
Dylan K. Taylor
b5790d19bf Cleaned up MainLogger registration and declared a typehint
Remove null hint from MainLogger::getLogger() so static analysis doesn't complain everywhere
just make sure you register the logger before trying to use MainLogger::getLogger() on a different thread!
2017-07-14 11:39:04 +01:00
Dylan K. Taylor
9c9095060f Register MainLogger on AsyncWorkers to make MainLogger::getLogger() usable in AsyncTasks
Threaded static properties aren't thread-local anymore in pthreads 3.1.7dev
2017-07-04 16:50:17 +01:00
Dylan K. Taylor
51b0673b4b Bite the bullet and enable strict types on everything 2017-06-07 12:53:16 +01:00
Dylan K. Taylor
4c61ad9f2d Stop skipping stack frames (#425) 2017-03-19 10:24:33 +00:00
Dylan K. Taylor
d6629d6843 More ?? (#131)
* More ??

* fix undefined variable
2016-11-30 10:07:37 +00:00
SOFe
58ff381557 PhpStorm automated formatting (#11)
* PhpStorm reformatting

* Tuned PhpStorm reformatting

* Improved ItemIds and BlockIds formatting

* Tuned more PhpStorm reformatting

* Improved string concatenation
2016-10-03 19:05:48 +08:00
Shoghi Cervantes
472fcfa4c7 Removed ThreadedFactory 2015-09-18 11:18:41 +02:00
Shoghi Cervantes
e137ac4c56 Base PHP7 work to make it "run" - READ NEXT LINES!
All plugins will need to bump the API if they want to use this.
NOTE THAT THIS IS NOT THE FINAL API 2.0.0 AND THAT THERE WILL BE MORE CHANGES.
To start updating, you might also want to read https://secure.php.net/manual/en/migration70.php and specifically https://secure.php.net/manual/en/migration70.incompatible.php

To compile PHP7 with some of the required dependencies, use https://gist.github.com/shoghicp/166ab26ce5cc7a390f45
ONLY LINUX IS TESTED, DO NOT ASK FOR OTHER PLATFORMS!

----- THIS VERSION IS NOT SUPPORTED -----

This version WILL crash randomly in unexpected places due to PHP7, pthreads, PocketMine or cosmic rays.

Handle with care, and store under direct sunlight for the best performance.
2015-09-10 21:29:29 +02:00
Shoghi Cervantes
7cf5df7e46 New console output formatting 2015-06-09 14:40:40 +02:00
Shoghi Cervantes
f20d5b2c69 Fixed MainLogger 2015-05-29 11:38:18 +02:00
Shoghi Cervantes
03f178379e
Fixed items getting corrupted pickup delay, not being able to be killed by other damage sources 2015-05-28 22:17:12 +02:00
Shoghi Cervantes
1666602652
Improved memory output, logging, removed locks 2015-03-22 03:20:48 +01:00
Shoghi Cervantes
f9361aa931
Use new colors in terminal 2015-03-15 18:32:36 +01:00
Shoghi Cervantes
b0f8c14640
Added Terminal class, Improved normal generator speed 2015-03-15 00:15:24 +01:00
Shoghi Cervantes
5f4f996efe
Fixed #2599 2015-02-15 19:01:25 +01:00
Shoghi Cervantes
24c6cca664
Updated RakLib, fixed help message not showing command, added documentation to Plugin->getResource() 2015-01-14 17:23:16 +01:00
Shoghi Cervantes
3128ae9736
Improved exception handling and trace creation 2015-01-01 22:50:45 +01:00
Shoghi Cervantes
2f6007342c
Fixed server.log created in two different places on path changed 2014-12-22 23:00:28 +01:00
Shoghi Cervantes
747f7685e7 Fix formatting issues due to bad IDE settings 2014-12-07 16:30:04 +01:00
Shoghi Cervantes
79bc1d6c85 Fixed server not stopping after a special crash 2014-11-04 17:15:20 +01:00
Shoghi Cervantes
b6f7ee20fc Added Error -> Exception handling 2014-10-28 20:43:36 +01:00
Shoghi Cervantes
43635b501a Made logging better, plugin loggers can be attached by others 2014-07-02 23:33:29 +02:00
Shoghi Cervantes
75d2409a7c Added ThreadedLoggerAttachments 2014-07-01 20:50:51 +02:00
Shoghi Cervantes
fa50cbf4b3 Working Threaded Generation 2014-06-10 20:45:09 +02:00
Shoghi Cervantes
41fe4a527a Update MainLogger.php 2014-06-07 04:19:19 +02:00
Shoghi Cervantes
24d95fb7fd Added \ThreadedLogger abstract class 2014-06-02 14:47:38 +02:00
Shoghi Cervantes
a17d847a82 Moved Logger interface to root 2014-06-02 14:41:43 +02:00
Shoghi Cervantes
49370c21d1 Removed locks from MainLogger 2014-05-29 04:11:20 +02:00
Shoghi Cervantes
8d40f843cf MainLogger can now have debug level disabled 2014-05-29 00:08:02 +02:00
Shoghi Cervantes
7bd6f2ed91 Added Logger interface, threaded MainLogger and updated PluginLogger 2014-05-28 23:46:56 +02:00