Skip to content

FlexLogTarget fails with USE_STACKTRACE and directlogger due to illegal characters in category name #114

Open
@GoogleCodeExporter

Description

@GoogleCodeExporter
What steps will reproduce the problem?

      USE_STACKTRACE = true;
      LOGGER_FACTORY.setup = new SimpleTargetSetup(new FlexLogTarget());
      info('test!');

What is the expected output? What do you see instead?

Expect log output, instead you get exception:
Categories can not contain any of the following characters: 
[]`~,!@#$%*^&()]{}+=|';?><./".

What version of the product are you using? On what operating system?
as3commons-logging-2.7

Please provide any additional information below.

Other than not using USE_STACKTRACE in your Flex Log debugging, here is my 
simple workaround/fix:
In FlexLogTarget, add this line at the start of log() function to replace all 
invalid FlexLog characters with valid dot in category name:

      name = name.replace(/[\[\]\~\$\^\&\\(\)\{\}\+\?\/=`!@#%,:;'"<>\s]/g, '.');

Original issue reported on code.google.com by [email protected] on 18 Jan 2012 at 11:25

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions