[coldbox 4.2.0] How to log codeerrors wthin views via logbox, if an errortemplate is used

28 vistas
Ir al primer mensaje no leído

ms.9...@gmail.com

no leída,
9 ago 2016, 6:35:46 a.m.9/8/2016
para ColdBox Platform
I upgraded from cb3.8 to cb4.2 and found that errors that occur within view-templates are not automatically logged with logbox. How can I do that?
Thanks, Martin

Luis Majano

no leída,
9 ago 2016, 11:08:18 a.m.9/8/2016
para coldbox
It all depends how you have configured LogBox martin, can you share your LogBox confriguration
On Tue, Aug 9, 2016 at 5:35 AM, <ms.9...@gmail.com> wrote:
I upgraded from cb3.8 to cb4.2 and found that errors that occur within view-templates are not automatically logged with logbox. How can I do that?
Thanks, Martin

--
--
You received this message because you are subscribed to the Google Groups "ColdBox Platform" group.
For News, visit http://blog.coldbox.org
For Documentation, visit http://wiki.coldbox.org
For Bug Reports, visit https://ortussolutions.atlassian.net/browse/COLDBOX
---
You received this message because you are subscribed to the Google Groups "ColdBox Platform" group.
To unsubscribe from this group and stop receiving emails from it, send an email to coldbox+unsubscribe@googlegroups.com.
To post to this group, send email to col...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/coldbox/bf8765b0-5ab1-418d-8d3e-c6cf870aea4d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

ms.9...@gmail.com

no leída,
10 ago 2016, 2:03:50 a.m.10/8/2016
para ColdBox Platform
logBox =
{
    // Define Appenders
    appenders =
    {
        /*coldboxTracer =
        {
            class = "coldbox.system.logging.appenders.ColdboxTracerAppender"
        }, */
        LogMail =
        {
            class = "coldbox.system.logging.appenders.EmailAppender", properties =
            {
                subject = "Fehler in ueberwachung-Infobase", from = "ueberwachu...@xxx.de", to = "ad...@xxx.de"
            }, levelMin = "FATAL", levelMax = "FATAL"
        },LogMail2 =
        {
            class = "coldbox.system.logging.appenders.EmailAppender", properties =
            {
                subject = "Fehler in ueberwachung-Infobase", from = "ueberwachu...@xxx.de", to = "info...@xxx.de"
            }, levelMin = "FATAL", levelMax = "ERROR"
        }, LogFile =
        {
            class = "coldbox.system.logging.appenders.FileAppender",  properties =
            {async=true,
                filePath = "/wartung_files/logfiles/", filename = "logfile", fileEncoding = "UTF-8", autoExpand = 'true', fileMaxSize = '2000', fileMaxArchives = '20'
            }, levelMin = "FATAL", levelMax = "WARN"
        }, LogDB =
        {
            class = "coldbox.system.logging.appenders.DBAppender", properties =
            { async=true,
                dsn = "ueberwachung_2013", table = "tb_coldboxlog", autocreate = false
            }, levelMin = "FATAL", levelMax = "WARN"
        }
    },
    // Root Logger
    root =
    {
        levelmin = "FATAL", levelmax = "WARN", appenders = "*"
    },
};

logbox.categories["coldbox.system"]={levelmin="OFF",levelmax="OFF",appenders="*"};

Luis Majano

no leída,
10 ago 2016, 11:14:16 a.m.10/8/2016
para coldbox

On Wed, Aug 10, 2016 at 1:03 AM, <ms.9...@gmail.com> wrote:
    levelmin = "FATAL", levelmax = "WARN", appenders = "*"

do you have a small test case we can reproduce?

Brad Wood

no leída,
10 ago 2016, 11:31:28 p.m.10/8/2016
para ColdBox Platform
Do you have an exception handler configured in your config/ColdBox.cfc file like so:

exceptionHandler = "main.onException",

ColdBox will only automatically log the error if you do NOT have a n exception handler.  If you do have an exception handler, it's up to you to log the error yourself.  
Ex:

function onException(){
log.error( prc.exception.getMessage(), prc.exception );
}

ms.9...@gmail.com

no leída,
11 ago 2016, 2:23:16 a.m.11/8/2016
para ColdBox Platform
I have an exception-handler configured. Thanks Brad, "log.error( prc.exception.getMessage(), prc.exception )" is what I wanted to know.
Responder a todos
Responder al autor
Reenviar
0 mensajes nuevos