Converting from string to enum by name

Jarl André" <jarl.andre at> Jarl André" <jarl.andre at>
Mon May 28 11:50:06 PDT 2012


I have a project on github,, where I have 
added very custom logger library. In this logger library I have 
an enum LogLevel that looks like enum LogLevel { ALL, INFO, 


1. Is there a way to convert from string "INFO" to LogLevel.INFO, 
by name?
2. does it really not exist any functional logging libraries for 

I have made a very crude system where I specify the LogLevel that 
I want to be printed to stdout and have not yet begun to compare 
if loglevel is greater than or equal to whatever. thats my next 

More information about the Digitalmars-d-learn mailing list