You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@axis.apache.org by "Ruwan Janapriya (JIRA)" <ji...@apache.org> on 2008/06/25 16:14:45 UTC

[jira] Created: (AXIS2C-1203) More readable LOG Macros.

More readable LOG Macros.
-------------------------

                 Key: AXIS2C-1203
                 URL: https://issues.apache.org/jira/browse/AXIS2C-1203
             Project: Axis2-C
          Issue Type: Improvement
         Environment: Any
            Reporter: Ruwan Janapriya


Current Macros to log are considerably long, so more readable log macros are suggested. Also the suggested approach will have project/module name in one place and each "LOG" call would print that before the message.

e.g. 

#define AXIS2_LOG_DEBUG_MSG(log, msg) AXIS2_LOG_DEBUG (log, AXIS2_LOG_SI, "%s %s", AXIS2_LOG_PROJECT_PREFIX, msg)

in the user project header,

#ifdef AXIS2_LOG_PROJECT_PREFIX
  #undef AXIS2_LOG_PROJECT_PREFIX
#endif

#define AXIS2_LOG_PROJECT_PREFIX "[Project XYZ]"

in the user project source,

AXIS2_LOG_DEBUG_MSG(env->log, "Debug Message Tik Tak Too");


the expected output would be,

[Mon Apr 28 23:22:08 2008] [debug] ..\..\src\tiktak.c(246) [Project XYZ] Debug Message Tik Tak Too



-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-dev-help@ws.apache.org


[jira] Updated: (AXIS2C-1203) More readable LOG Macros.

Posted by "Ruwan Janapriya (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2C-1203?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ruwan Janapriya updated AXIS2C-1203:
------------------------------------

    Attachment: readable_macro_correction.patch

That is true, readable_macro_correction.patch would do the job. This is the patch for the current svn. 

> More readable LOG Macros.
> -------------------------
>
>                 Key: AXIS2C-1203
>                 URL: https://issues.apache.org/jira/browse/AXIS2C-1203
>             Project: Axis2-C
>          Issue Type: Improvement
>         Environment: Any
>            Reporter: Ruwan Janapriya
>            Assignee: Supun Kamburugamuva
>         Attachments: readable_macro.patch, readable_macro_correction.patch
>
>
> Current Macros to log are considerably long, so more readable log macros are suggested. Also the suggested approach will have project/module name in one place and each "LOG" call would print that before the message.
> e.g. 
> #define AXIS2_LOG_DEBUG_MSG(log, msg) AXIS2_LOG_DEBUG (log, AXIS2_LOG_SI, "%s %s", AXIS2_LOG_PROJECT_PREFIX, msg)
> in the user project header,
> #ifdef AXIS2_LOG_PROJECT_PREFIX
>   #undef AXIS2_LOG_PROJECT_PREFIX
> #endif
> #define AXIS2_LOG_PROJECT_PREFIX "[Project XYZ]"
> in the user project source,
> AXIS2_LOG_DEBUG_MSG(env->log, "Debug Message Tik Tak Too");
> the expected output would be,
> [Mon Apr 28 23:22:08 2008] [debug] ..\..\src\tiktak.c(246) [Project XYZ] Debug Message Tik Tak Too

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-dev-help@ws.apache.org


[jira] Updated: (AXIS2C-1203) More readable LOG Macros.

Posted by "Ruwan Janapriya (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2C-1203?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ruwan Janapriya updated AXIS2C-1203:
------------------------------------

    Attachment: readable_macro.patch

Apply this patch at util/include directory. 

> More readable LOG Macros.
> -------------------------
>
>                 Key: AXIS2C-1203
>                 URL: https://issues.apache.org/jira/browse/AXIS2C-1203
>             Project: Axis2-C
>          Issue Type: Improvement
>         Environment: Any
>            Reporter: Ruwan Janapriya
>         Attachments: readable_macro.patch
>
>
> Current Macros to log are considerably long, so more readable log macros are suggested. Also the suggested approach will have project/module name in one place and each "LOG" call would print that before the message.
> e.g. 
> #define AXIS2_LOG_DEBUG_MSG(log, msg) AXIS2_LOG_DEBUG (log, AXIS2_LOG_SI, "%s %s", AXIS2_LOG_PROJECT_PREFIX, msg)
> in the user project header,
> #ifdef AXIS2_LOG_PROJECT_PREFIX
>   #undef AXIS2_LOG_PROJECT_PREFIX
> #endif
> #define AXIS2_LOG_PROJECT_PREFIX "[Project XYZ]"
> in the user project source,
> AXIS2_LOG_DEBUG_MSG(env->log, "Debug Message Tik Tak Too");
> the expected output would be,
> [Mon Apr 28 23:22:08 2008] [debug] ..\..\src\tiktak.c(246) [Project XYZ] Debug Message Tik Tak Too

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-dev-help@ws.apache.org


[jira] Resolved: (AXIS2C-1203) More readable LOG Macros.

Posted by "Supun Kamburugamuva (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2C-1203?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Supun Kamburugamuva resolved AXIS2C-1203.
-----------------------------------------

    Resolution: Fixed

Applied the patch. Thanks Janapriaya.

> More readable LOG Macros.
> -------------------------
>
>                 Key: AXIS2C-1203
>                 URL: https://issues.apache.org/jira/browse/AXIS2C-1203
>             Project: Axis2-C
>          Issue Type: Improvement
>         Environment: Any
>            Reporter: Ruwan Janapriya
>            Assignee: Supun Kamburugamuva
>         Attachments: readable_macro.patch
>
>
> Current Macros to log are considerably long, so more readable log macros are suggested. Also the suggested approach will have project/module name in one place and each "LOG" call would print that before the message.
> e.g. 
> #define AXIS2_LOG_DEBUG_MSG(log, msg) AXIS2_LOG_DEBUG (log, AXIS2_LOG_SI, "%s %s", AXIS2_LOG_PROJECT_PREFIX, msg)
> in the user project header,
> #ifdef AXIS2_LOG_PROJECT_PREFIX
>   #undef AXIS2_LOG_PROJECT_PREFIX
> #endif
> #define AXIS2_LOG_PROJECT_PREFIX "[Project XYZ]"
> in the user project source,
> AXIS2_LOG_DEBUG_MSG(env->log, "Debug Message Tik Tak Too");
> the expected output would be,
> [Mon Apr 28 23:22:08 2008] [debug] ..\..\src\tiktak.c(246) [Project XYZ] Debug Message Tik Tak Too

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-dev-help@ws.apache.org


[jira] Updated: (AXIS2C-1203) More readable LOG Macros.

Posted by "Ruwan Janapriya (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2C-1203?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ruwan Janapriya updated AXIS2C-1203:
------------------------------------

    Attachment:     (was: readable_macro.patch)

> More readable LOG Macros.
> -------------------------
>
>                 Key: AXIS2C-1203
>                 URL: https://issues.apache.org/jira/browse/AXIS2C-1203
>             Project: Axis2-C
>          Issue Type: Improvement
>         Environment: Any
>            Reporter: Ruwan Janapriya
>         Attachments: readable_macro.patch
>
>
> Current Macros to log are considerably long, so more readable log macros are suggested. Also the suggested approach will have project/module name in one place and each "LOG" call would print that before the message.
> e.g. 
> #define AXIS2_LOG_DEBUG_MSG(log, msg) AXIS2_LOG_DEBUG (log, AXIS2_LOG_SI, "%s %s", AXIS2_LOG_PROJECT_PREFIX, msg)
> in the user project header,
> #ifdef AXIS2_LOG_PROJECT_PREFIX
>   #undef AXIS2_LOG_PROJECT_PREFIX
> #endif
> #define AXIS2_LOG_PROJECT_PREFIX "[Project XYZ]"
> in the user project source,
> AXIS2_LOG_DEBUG_MSG(env->log, "Debug Message Tik Tak Too");
> the expected output would be,
> [Mon Apr 28 23:22:08 2008] [debug] ..\..\src\tiktak.c(246) [Project XYZ] Debug Message Tik Tak Too

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-dev-help@ws.apache.org


[jira] Updated: (AXIS2C-1203) More readable LOG Macros.

Posted by "Ruwan Janapriya (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2C-1203?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ruwan Janapriya updated AXIS2C-1203:
------------------------------------

    Attachment: readable_macro.patch

Above patch should be applied at /util/include directory.



> More readable LOG Macros.
> -------------------------
>
>                 Key: AXIS2C-1203
>                 URL: https://issues.apache.org/jira/browse/AXIS2C-1203
>             Project: Axis2-C
>          Issue Type: Improvement
>         Environment: Any
>            Reporter: Ruwan Janapriya
>         Attachments: readable_macro.patch
>
>
> Current Macros to log are considerably long, so more readable log macros are suggested. Also the suggested approach will have project/module name in one place and each "LOG" call would print that before the message.
> e.g. 
> #define AXIS2_LOG_DEBUG_MSG(log, msg) AXIS2_LOG_DEBUG (log, AXIS2_LOG_SI, "%s %s", AXIS2_LOG_PROJECT_PREFIX, msg)
> in the user project header,
> #ifdef AXIS2_LOG_PROJECT_PREFIX
>   #undef AXIS2_LOG_PROJECT_PREFIX
> #endif
> #define AXIS2_LOG_PROJECT_PREFIX "[Project XYZ]"
> in the user project source,
> AXIS2_LOG_DEBUG_MSG(env->log, "Debug Message Tik Tak Too");
> the expected output would be,
> [Mon Apr 28 23:22:08 2008] [debug] ..\..\src\tiktak.c(246) [Project XYZ] Debug Message Tik Tak Too

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-dev-help@ws.apache.org


[jira] Assigned: (AXIS2C-1203) More readable LOG Macros.

Posted by "Supun Kamburugamuva (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2C-1203?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Supun Kamburugamuva reassigned AXIS2C-1203:
-------------------------------------------

    Assignee: Supun Kamburugamuva

> More readable LOG Macros.
> -------------------------
>
>                 Key: AXIS2C-1203
>                 URL: https://issues.apache.org/jira/browse/AXIS2C-1203
>             Project: Axis2-C
>          Issue Type: Improvement
>         Environment: Any
>            Reporter: Ruwan Janapriya
>            Assignee: Supun Kamburugamuva
>         Attachments: readable_macro.patch
>
>
> Current Macros to log are considerably long, so more readable log macros are suggested. Also the suggested approach will have project/module name in one place and each "LOG" call would print that before the message.
> e.g. 
> #define AXIS2_LOG_DEBUG_MSG(log, msg) AXIS2_LOG_DEBUG (log, AXIS2_LOG_SI, "%s %s", AXIS2_LOG_PROJECT_PREFIX, msg)
> in the user project header,
> #ifdef AXIS2_LOG_PROJECT_PREFIX
>   #undef AXIS2_LOG_PROJECT_PREFIX
> #endif
> #define AXIS2_LOG_PROJECT_PREFIX "[Project XYZ]"
> in the user project source,
> AXIS2_LOG_DEBUG_MSG(env->log, "Debug Message Tik Tak Too");
> the expected output would be,
> [Mon Apr 28 23:22:08 2008] [debug] ..\..\src\tiktak.c(246) [Project XYZ] Debug Message Tik Tak Too

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-dev-help@ws.apache.org


[jira] Updated: (AXIS2C-1203) More readable LOG Macros.

Posted by "Ruwan Janapriya (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2C-1203?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ruwan Janapriya updated AXIS2C-1203:
------------------------------------

    Comment: was deleted

> More readable LOG Macros.
> -------------------------
>
>                 Key: AXIS2C-1203
>                 URL: https://issues.apache.org/jira/browse/AXIS2C-1203
>             Project: Axis2-C
>          Issue Type: Improvement
>         Environment: Any
>            Reporter: Ruwan Janapriya
>         Attachments: readable_macro.patch
>
>
> Current Macros to log are considerably long, so more readable log macros are suggested. Also the suggested approach will have project/module name in one place and each "LOG" call would print that before the message.
> e.g. 
> #define AXIS2_LOG_DEBUG_MSG(log, msg) AXIS2_LOG_DEBUG (log, AXIS2_LOG_SI, "%s %s", AXIS2_LOG_PROJECT_PREFIX, msg)
> in the user project header,
> #ifdef AXIS2_LOG_PROJECT_PREFIX
>   #undef AXIS2_LOG_PROJECT_PREFIX
> #endif
> #define AXIS2_LOG_PROJECT_PREFIX "[Project XYZ]"
> in the user project source,
> AXIS2_LOG_DEBUG_MSG(env->log, "Debug Message Tik Tak Too");
> the expected output would be,
> [Mon Apr 28 23:22:08 2008] [debug] ..\..\src\tiktak.c(246) [Project XYZ] Debug Message Tik Tak Too

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-dev-help@ws.apache.org


[jira] Commented: (AXIS2C-1203) More readable LOG Macros.

Posted by "Damitha Kumarage (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2C-1203?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12608309#action_12608309 ] 

Damitha Kumarage commented on AXIS2C-1203:
------------------------------------------

It seems to me that the patch has a small bug in
#define AXIS2_LOG_INFO_MSG(log, msg) AXIS2_LOG_INFO (log, AXIS2_LOG_SI, "%s %s", AXIS2_LOG_PROJECT_PREFIX, msg)

AFAIK log info does not print file name and line number.

> More readable LOG Macros.
> -------------------------
>
>                 Key: AXIS2C-1203
>                 URL: https://issues.apache.org/jira/browse/AXIS2C-1203
>             Project: Axis2-C
>          Issue Type: Improvement
>         Environment: Any
>            Reporter: Ruwan Janapriya
>            Assignee: Supun Kamburugamuva
>         Attachments: readable_macro.patch
>
>
> Current Macros to log are considerably long, so more readable log macros are suggested. Also the suggested approach will have project/module name in one place and each "LOG" call would print that before the message.
> e.g. 
> #define AXIS2_LOG_DEBUG_MSG(log, msg) AXIS2_LOG_DEBUG (log, AXIS2_LOG_SI, "%s %s", AXIS2_LOG_PROJECT_PREFIX, msg)
> in the user project header,
> #ifdef AXIS2_LOG_PROJECT_PREFIX
>   #undef AXIS2_LOG_PROJECT_PREFIX
> #endif
> #define AXIS2_LOG_PROJECT_PREFIX "[Project XYZ]"
> in the user project source,
> AXIS2_LOG_DEBUG_MSG(env->log, "Debug Message Tik Tak Too");
> the expected output would be,
> [Mon Apr 28 23:22:08 2008] [debug] ..\..\src\tiktak.c(246) [Project XYZ] Debug Message Tik Tak Too

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-dev-help@ws.apache.org