Link to home
Start Free TrialLog in
Avatar of sharpodal
sharpodal

asked on

Unable to log information and errors using RoleManager

I create a simple Web Cloud Service and run it and then see the Development Fabric
WebRole the first instance. But the log is empty. Do I need to do any setting for
the logging.
This is the simple code behind

   protected void btnLog_Click(object sender, EventArgs e)
        {
            RoleManager.WriteToLog("Information", txtMessage.Text);
        }

        protected void btnThrowException_Click(object sender, EventArgs e)
        {
            try
            {
                object o = null;
                o.ToString();
            }
            catch (Exception ex)
            {

                RoleManager.WriteToLog("Error", ex.Message);
            }
        }
SOLUTION
Avatar of shakashico
shakashico
Flag of Egypt image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial