[Resource] HoconFile

A simple resource that makes file and configurations with HOCON a tad bit easier to manipulate.

Verbose version: HoconFile (verbose version) · GitHub
Non-verbose version: HoconFile (non-verbose version) · GitHub
Example usage: HoconFile example! · GitHub

Also for those unaware, you can easily retrieve the folder /<server-root>/config/<plugin-folder>/ with:

@Inject
@ConfigDir(sharedRoot = false)
File folder;

As always, any and all feedback is appreciated :smile:

3 Likes

Great resource @wingz

Give it a cuter name :stuck_out_tongue:
(ex. iHocon etc)

I need to edit the logging to be more detailed and make use of debug etc since verbosity could be nice to have on all the time now that I think about it. Would be good to be informed about issues, but not about creating/loading/saving etc.

EDIT: And eh, this is FOSS so go ahead and hack that name away!

1 Like

From what i’ve experimented with the .debug() does not output anything to console, perhaps a protocol thing? Idk, let me know how it works out!

http://www.slf4j.org/api/org/apache/log4j/Level.html

1 Like

I use debug whenever I’m testing a plugin with Logger#debug() and I’ve never experienced it not logging, before.


Merged posts
<strike.Also note that mergeDefaults() doesn’t copy comments 100% (not sure why). It’s most likely on Configurate's end so I’ll see if I can’t look into it or at least open an issue about it.

EDIT:
Relevant issue

Update: #1
As per the (now closed) GitHub Issue, the comment issue should be fixed on configurate’s end. Going to test it out soon, if anyone else can please let me know!

Update #2: Seems to be fixed! We still have alphabetization (that’s a thing right?) going on when the defaults are copied.

EDIT 01/10/2015 @ 10:59PM EST
Relevant issue to alphabetization: https://github.com/zml2008/configurate/issues/31

Updated verbose HoconFile HoconFile (verbose version) · GitHub (link also in OP).
Updated links in OP to compensate for GitHub account username change.