http://coldfusion.com logo
#box-products
Title
# box-products
b

bockensm

03/29/2022, 8:24 PM
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

bdw429s

03/29/2022, 8:25 PM
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

bockensm

03/29/2022, 8:25 PM
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

bdw429s

03/29/2022, 8:27 PM
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

bockensm

03/29/2022, 8:29 PM
Which very well could be why it's only found in FileAppender in the first place
b

bdw429s

03/29/2022, 8:30 PM
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

bockensm

03/29/2022, 8:30 PM
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

bdw429s

03/29/2022, 8:39 PM
Yes
2 Views