mirror of
https://github.com/greenshot/greenshot
synced 2025-08-21 14:03:23 -07:00
BUG-2079: Small changes for the bug, to help to track the issue. [skip ci]
This commit is contained in:
parent
01abc5e9e4
commit
4f289d838a
3 changed files with 34 additions and 7 deletions
|
@ -27,13 +27,14 @@ using System.Threading.Tasks;
|
|||
using Dapplo.Log.Facade;
|
||||
using GreenshotJiraPlugin.Forms;
|
||||
using GreenshotPlugin.Core;
|
||||
using log4net;
|
||||
|
||||
namespace GreenshotJiraPlugin {
|
||||
/// <summary>
|
||||
/// This is the JiraPlugin base code
|
||||
/// </summary>
|
||||
public class JiraPlugin : IGreenshotPlugin {
|
||||
private static readonly log4net.ILog Log = log4net.LogManager.GetLogger(typeof(JiraPlugin));
|
||||
private static readonly ILog Log = LogManager.GetLogger(typeof(JiraPlugin));
|
||||
private JiraConfiguration _config;
|
||||
private static JiraPlugin _instance;
|
||||
private JiraConnector _jiraConnector;
|
||||
|
@ -94,7 +95,32 @@ namespace GreenshotJiraPlugin {
|
|||
public bool Initialize(IGreenshotHost pluginHost, PluginAttribute myAttributes) {
|
||||
// Register configuration (don't need the configuration itself)
|
||||
_config = IniConfig.GetIniSection<JiraConfiguration>();
|
||||
LogSettings.RegisterDefaultLogger<Log4NetLogger>();
|
||||
|
||||
// Make sure the loggin is enable for the corect level.
|
||||
if (Log.IsDebugEnabled)
|
||||
{
|
||||
LogSettings.RegisterDefaultLogger<Log4NetLogger>(LogLevels.Verbose);
|
||||
}
|
||||
else if (Log.IsInfoEnabled)
|
||||
{
|
||||
LogSettings.RegisterDefaultLogger<Log4NetLogger>(LogLevels.Info);
|
||||
}
|
||||
else if (Log.IsWarnEnabled)
|
||||
{
|
||||
LogSettings.RegisterDefaultLogger<Log4NetLogger>(LogLevels.Warn);
|
||||
}
|
||||
else if (Log.IsErrorEnabled)
|
||||
{
|
||||
LogSettings.RegisterDefaultLogger<Log4NetLogger>(LogLevels.Error);
|
||||
}
|
||||
else if (Log.IsErrorEnabled)
|
||||
{
|
||||
LogSettings.RegisterDefaultLogger<Log4NetLogger>(LogLevels.Error);
|
||||
}
|
||||
else
|
||||
{
|
||||
LogSettings.RegisterDefaultLogger<Log4NetLogger>(LogLevels.Fatal);
|
||||
}
|
||||
|
||||
// Add a SVG converter, although it doesn't fit to the Jira plugin there is currently no other way
|
||||
ImageHelper.StreamConverters["svg"] = (stream, s) =>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue