Second - and again in `FileAppender` - the `initLo...
# box-products
b
Second - and again in
FileAppender
- the
initLogLocation
method writes a default first line that's hardcoded but doesn't allow me to have a different first line depending on the layout object I pass. Is there a good way to specify which headings (or none) I want to use?
b
No, not really. Ideally the formatter CFC would be used for that, but I don't think the interface has a method for the header to write
Honestly, I'm not entirely sure how big of a deal the header is, lol
b
It's not a big deal, but if it's not going to match my layout, I'd rather not have it there at all.
If this were returned by a method
getHeaderLine
, my extending component could either return a blank line or return something pertinent to my particular layout.
b
Yeah, IMO the "correct" fix would be to add a method like
header()
here https://github.com/ColdBox/coldbox-platform/blob/development/system/logging/Layout.cfc
That's supposed to be the base class for custom formatter CFCs
Then update all appenders that use an optional formatter to call that method if it makes sense for them (doesn't make sense for console appender, etc)
Honestly, it's probably ONLY the file appender where it does make sense, lol
But that would allow for customization in a manner that at least held with the current architecture in place
b
Which very well could be why it's only found in FileAppender in the first place
b
Very few people ever use a custom formatter to be honest, so it's not a problem oft encountered
But it would be fairly simple to solve
b
I'm nothing if not overly particular about what I like
This is the repo where I'll send the PR, yea? https://github.com/ColdBox/coldbox-platform
b
Yes