Happy Friday folks,
I've been struggling with successfully configuring an EmailAppender to log only error or fatal warnings within an app. Does anyone have a config they could share or better yet a blog post if written?
Thanks guys.
Nolan
Happy Friday folks,
I've been struggling with successfully configuring an EmailAppender to log only error or fatal warnings within an app. Does anyone have a config they could share or better yet a blog post if written?
Thanks guys.
Nolan
This is working for me, I also noticed a bug in the emailAppender code that does not use $throw correctly.
email = {
class=“coldbox.system.logging.appenders.EmailAppender”,
properties={
from=“fromEmailAddress”,
to=“toEmailAddress”,
subject=“Logging Error”
}
}
I found one more thing. you need to set the root for the email appender
logBox = {
// Define Appenders
appenders = {
email = {
class=“coldbox.system.logging.appenders.EmailAppender”,
properties={
from=“email”,
to=“email”,
subject=“Logging Error”
},
levelMax = “WARN”,
levelMin = “FATAL”
}
},
// Root Logger
root = { levelmax=“INFO”, appenders="*" },
root = { levelmin=“FATAL”, levelmax=“WARN”, appenders=“email” },
// Implicit Level Categories
info = [ “coldbox.system” ]
};
Try that.