log4perl icon indicating copy to clipboard operation
log4perl copied to clipboard

Using dots in property configuration names

Open doojonio opened this issue 4 years ago • 2 comments

Hi, I am using property configuration. And now I need to use dots in names for some fields. For example:

JsonLayout.field.browser.name = Firefox

In this case I want to get field like that:

field->{'browser.name'} == 'Firefox'

So I propose to use some char sequence as dot. For example if we gonna use '~1' char sequence as dot, than configuration, which will look like this:

JsonLayout.field.browser~1name = Firefox

And field hash will look like this:

field->{'browser.name'} == 'Firefox'

Can we do this? I can create pull request for this, if you like this idea

doojonio avatar Apr 14 '21 09:04 doojonio

I think you'd be able to have this right now with the code as it is, if you just use e.g. _ to be your escape character, with __ as literal underscore, then _1A3_ be the hexadecimal escape "1A3"? (and obviously decode that where you need to do so)

mohawk2 avatar Jun 01 '22 23:06 mohawk2