docker-minecraft-server icon indicating copy to clipboard operation
docker-minecraft-server copied to clipboard

New logger with color and specific types. Code cleanup

Open IronMine opened this issue 1 year ago • 6 comments

In this PR there is :

  • Removing some unused functions
  • A new logger system with colors
  • A Warning specific logger ( yellow )
  • An Eroor specific logger ( red )
  • Fixing broken CanyonModded link url to jenkins
  • Optimizing some curl calls
  • A little bit of code cleanup
  • Some proposal ( start-finalExec and start-setupServerProperties)

IronMine avatar Oct 15 '24 17:10 IronMine

This is a lot of changes for one PR. I know this is hard after the fact, but is there any way you could break this up into a few smaller ones?

itzg avatar Oct 15 '24 20:10 itzg

will do !

IronMine avatar Oct 15 '24 20:10 IronMine

is there some things i listed that you do not want ?

IronMine avatar Oct 15 '24 20:10 IronMine

Glancing at the changes I like all of it 😃

Actually, keep the PR as is and I'll review more closely when I get a span of time. With that I can raise any specific concerns I find, if any.

itzg avatar Oct 15 '24 22:10 itzg

Nice perfect ! As you want it is a huge PR i do understand if you would prefer it separate in multiple small ones

IronMine avatar Oct 15 '24 22:10 IronMine

With new formatted logging, the output from DEBUG set to "true" is getting noisier, such as:

[init] 2024-10-20 16:46:51+00:00
+ logError '         SPONGEVANILLA, CUSTOM, MAGMA, MOHIST, CATSERVER, AIRPLANE, PUFFERFISH,'
++ getErrorColoredLogString '         SPONGEVANILLA, CUSTOM, MAGMA, MOHIST, CATSERVER, AIRPLANE, PUFFERFISH,'
++ echo '\033[0;31m[ERROR]          SPONGEVANILLA, CUSTOM, MAGMA, MOHIST, CATSERVER, AIRPLANE, PUFFERFISH, \033[0m'
+ log
+ local oldState
++ shopt -po xtrace
+ oldState='set -o xtrace'
+ shopt -u -o xtrace

It'll be redundant, but perhaps apply the same shopt-eval suppression of debug -x output around the logError and logWarn calls. All the more reason to keep the number of new logging functions minimal.

itzg avatar Oct 20 '24 16:10 itzg

Ah, IntelliJ was actually reporting the problem:

image

itzg avatar Oct 22 '24 20:10 itzg

Thanks so much for working with me on all the feedback I provided.

your are welcome and i apologize for all the time you loose on my PR's ^^

IronMine avatar Oct 22 '24 20:10 IronMine

like that ?

IronMine avatar Oct 22 '24 20:10 IronMine