• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# Logger类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中Logger的典型用法代码示例。如果您正苦于以下问题:C# Logger类的具体用法?C# Logger怎么用?C# Logger使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



Logger类属于命名空间,在下文中一共展示了Logger类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: GitWrapper

 public GitWrapper(string outputDirectory, Logger logger, Encoding commitEncoding,
     bool forceAnnotatedTags)
     : base(outputDirectory, logger, gitExecutable, gitMetaDir)
 {
     this.commitEncoding = commitEncoding;
     this.forceAnnotatedTags = forceAnnotatedTags;
 }
开发者ID:jcosta1968,项目名称:vss2git,代码行数:7,代码来源:GitWrapper.cs


示例2: TorznabController

 public TorznabController(IIndexerManagerService i, Logger l, IServerService s, ICacheService c)
 {
     indexerService = i;
     logger = l;
     serverService = s;
     cacheService = c;
 }
开发者ID:iheijoushin,项目名称:Jackett,代码行数:7,代码来源:TorznabController.cs


示例3: AssemblyResolver

 public AssemblyResolver(WeavingTask config, Logger logger, BuildEnginePropertyExtractor buildEnginePropertyExtractor)
 {
     this.config = config;
     this.logger = logger;
     this.buildEnginePropertyExtractor = buildEnginePropertyExtractor;
     assemblyDefinitionCache = new Dictionary<string, AssemblyDefinition>(StringComparer.OrdinalIgnoreCase);
 }
开发者ID:Z731,项目名称:NotifyPropertyWeaver,代码行数:7,代码来源:AssemblyResolver.cs


示例4: PirateTheNet

        public PirateTheNet(IIndexerManagerService i, Logger l, IWebClient w, IProtectionService ps)
            : base(name: "PirateTheNet",
                description: "A movie tracker",
                link: "http://piratethe.net/",
                caps: new TorznabCapabilities(),
                manager: i,
                client: w,
                logger: l,
                p: ps,
                configData: new ConfigurationDataBasicLoginWithRSSAndDisplay())
        {
            Encoding = Encoding.GetEncoding("UTF-8");
            Language = "en-us";

            this.configData.DisplayText.Value = "Only the results from the first search result page are shown, adjust your profile settings to show the maximum.";
            this.configData.DisplayText.Name = "Notice";

            AddCategoryMapping("1080P", TorznabCatType.MoviesHD);
            AddCategoryMapping("720P", TorznabCatType.MoviesHD);
            AddCategoryMapping("BDRip", TorznabCatType.MoviesSD);
            AddCategoryMapping("BluRay", TorznabCatType.MoviesBluRay);
            AddCategoryMapping("BRRip", TorznabCatType.MoviesSD);
            AddCategoryMapping("DVDR", TorznabCatType.MoviesDVD);
            AddCategoryMapping("DVDRip", TorznabCatType.MoviesSD);
            AddCategoryMapping("FLAC", TorznabCatType.AudioLossless);
            AddCategoryMapping("MP3", TorznabCatType.AudioMP3);
            AddCategoryMapping("MP4", TorznabCatType.AudioOther);
            AddCategoryMapping("Packs", TorznabCatType.Movies);
            AddCategoryMapping("R5", TorznabCatType.MoviesDVD);
            AddCategoryMapping("Remux", TorznabCatType.Movies);
            AddCategoryMapping("TVRip", TorznabCatType.MoviesOther);
            AddCategoryMapping("WebRip", TorznabCatType.MoviesWEBDL);
        }
开发者ID:Jackett,项目名称:Jackett,代码行数:33,代码来源:PirateTheNet.cs


示例5: Main

 static void Main()
 {
     Logger logger = new Logger(new FileAppender(new SimpleLayout(), "log.txt"));
     logger.Critical("asdasd");
     logger.Warn("asdasd");
     logger.Info("asdasd");
 }
开发者ID:shnogeorgiev,项目名称:Software-University-Courses,代码行数:7,代码来源:LoggerDemo.cs


示例6: ExamplePrograms

        public ExamplePrograms()
        {
            var loggerNamePattern = "BitSharp.Examples.*";
            var logLevel = LogLevel.Info;

            // log layout format
            var layout = "${message} ${exception:separator=\r\n:format=message,type,method,stackTrace:maxInnerExceptionLevel=10:innerExceptionSeparator=\r\n:innerFormat=message,type,method,stackTrace}";

            // initialize logging configuration
            var config = new LoggingConfiguration();

            // create console target
            var consoleTarget = new ColoredConsoleTarget();
            consoleTarget.Layout = layout;
            config.AddTarget("console", consoleTarget);
            config.LoggingRules.Add(new LoggingRule(loggerNamePattern, logLevel, consoleTarget));

            // create debugger target, if attached
            if (Debugger.IsAttached)
            {
                var debuggerTarget = new DebuggerTarget();
                debuggerTarget.Layout = layout;
                config.AddTarget("debugger", debuggerTarget);
                config.LoggingRules.Add(new LoggingRule(loggerNamePattern, logLevel, debuggerTarget));
            }

            LogManager.Configuration = config;
            logger = LogManager.GetCurrentClassLogger();
        }
开发者ID:ArsenShnurkov,项目名称:BitSharp,代码行数:29,代码来源:ExamplePrograms.cs


示例7: ImmortalSeed

        public ImmortalSeed(IIndexerManagerService i, IWebClient wc, Logger l)
            : base(name: "ImmortalSeed",
                description: "ImmortalSeed",
                link: "http://immortalseed.me/",
                caps: TorznabCapsUtil.CreateDefaultTorznabTVCaps(),
                manager: i,
                client: wc,
                logger: l)
        {
            AddCategoryMapping(32, TorznabCatType.Anime);
            AddCategoryMapping(47, TorznabCatType.TVSD);
            AddCategoryMapping(8, TorznabCatType.TVHD);
            AddCategoryMapping(48, TorznabCatType.TVHD);
            AddCategoryMapping(9, TorznabCatType.TVSD);
            AddCategoryMapping(4, TorznabCatType.TVHD);
            AddCategoryMapping(6, TorznabCatType.TVSD);

            AddCategoryMapping(22, TorznabCatType.Books);
            AddCategoryMapping(41, TorznabCatType.Comic);
            AddCategoryMapping(23, TorznabCatType.Apps);

            AddCategoryMapping(16, TorznabCatType.MoviesHD);
            AddCategoryMapping(17, TorznabCatType.MoviesSD);
            AddCategoryMapping(14, TorznabCatType.MoviesSD);
            AddCategoryMapping(34, TorznabCatType.MoviesForeign);
            AddCategoryMapping(18, TorznabCatType.MoviesForeign);
            AddCategoryMapping(33, TorznabCatType.MoviesForeign);

            AddCategoryMapping(34, TorznabCatType.Audio);
            AddCategoryMapping(37, TorznabCatType.AudioLossless);
            AddCategoryMapping(35, TorznabCatType.AudioBooks);
            AddCategoryMapping(36, TorznabCatType.AudioLossy);

        }
开发者ID:lin0sspice,项目名称:Jackett,代码行数:34,代码来源:ImmortalSeed.cs


示例8: NLogLogger

        public NLogLogger(Logger logger)
        {
            if (logger == null)
                throw new ArgumentNullException("logger");

            this.logger = logger;
        }
开发者ID:kaushik1605,项目名称:sample_DotNet,代码行数:7,代码来源:NLogLogger.cs


示例9: ArduiPort

 public ArduiPort(string name, int baud, Logger logger)
 {
     _Logger = logger;
     _port = new SerialPort(name, baud);
     SetName(name);
     SetBaudRate(baud);
 }
开发者ID:hightekjonathan,项目名称:ArduinoCMD,代码行数:7,代码来源:ArduiPort.cs


示例10: ScanWatchFolder

 public ScanWatchFolder(ICacheManager cacheManager, IDiskScanService diskScanService, IDiskProvider diskProvider, Logger logger)
 {
     _logger = logger;
     _diskProvider = diskProvider;
     _diskScanService = diskScanService;
     _watchFolderItemCache = cacheManager.GetCache<Dictionary<string, WatchFolderItem>>(GetType());
 }
开发者ID:mike-tesch,项目名称:Sonarr,代码行数:7,代码来源:ScanWatchFolder.cs


示例11: Language

        public Language(Konfiguration cfg, Logger log)
        {
            this.config = cfg;
            this.logger = log;

            this.parser = new LanguageParser(this.config, this.logger);
        }
开发者ID:asash,项目名称:dspam-fork,代码行数:7,代码来源:Language.cs


示例12: BitHdtv

        public BitHdtv(IIndexerManagerService i, Logger l, IWebClient w, IProtectionService ps)
            : base(name: "BIT-HDTV",
                description: "Home of high definition invites",
                link: "https://www.bit-hdtv.com/",
                caps: new TorznabCapabilities(),
                manager: i,
                client: w,
                logger: l,
                p: ps,
                configData: new ConfigurationDataBasicLogin())
        {
            Encoding = Encoding.GetEncoding("iso-8859-1");
            Language = "en-us";

            AddCategoryMapping(1, TorznabCatType.TVAnime); // Anime
            AddCategoryMapping(2, TorznabCatType.MoviesBluRay); // Blu-ray
            AddCategoryMapping(4, TorznabCatType.TVDocumentary); // Documentaries
            AddCategoryMapping(6, TorznabCatType.AudioLossless); // HQ Audio
            AddCategoryMapping(7, TorznabCatType.Movies); // Movies
            AddCategoryMapping(8, TorznabCatType.AudioVideo); // Music Videos
            AddCategoryMapping(5, TorznabCatType.TVSport); // Sports
            AddCategoryMapping(10, TorznabCatType.TV); // TV
            AddCategoryMapping(12, TorznabCatType.TV); // TV/Seasonpack
            AddCategoryMapping(11, TorznabCatType.XXX); // XXX
        }
开发者ID:Jackett,项目名称:Jackett,代码行数:25,代码来源:BitHdtv.cs


示例13: XmppManager

        /// <summary>
        /// 
        /// </summary>
        /// <param name="sJid">S jid.</param>
        /// <param name="sPassword">S password.</param>
        public XmppManager(AuthInfo authInfo, XmppServiceDescription xmppServiceDescription, OTRKeyRing _OTRKeyRing, OpenPGPRing _OpenPGPRing, ConversationManager _conversationManager, AddressBook _addressBook, Logger _logger)
        {
            try
            {
                m_Logger = _logger;
                m_OTRKeyRing = _OTRKeyRing;
                m_OpenPGPRing = _OpenPGPRing;
                m_AuthInfo = authInfo;
                m_OwnJid = new Jid (m_AuthInfo.m_sId);
                m_ClientConnection = new XmppClientConnection(m_OwnJid.Server);
                m_Contacts = new Dictionary<string, string> ();
                m_Logger.log(ELogLevel.LVL_INFO, "Trying to log in xmpp user", m_sModuleName);
                m_ClientConnection.Open(m_OwnJid.User, m_AuthInfo.m_sPassword);
                m_ConversationManager = _conversationManager;
                m_AddressBook = _addressBook;
                m_PresenceManager = new PresenceManager(m_AddressBook);
                m_OtrConnections = new Dictionary<string, int>();

                //register EventHandlers
                m_ClientConnection.OnLogin += new ObjectHandler(onLogin);
                m_ClientConnection.OnPresence += new PresenceHandler(OnPresence);
            }
            catch(Exception e) {
                Console.Write (e.Message);
            }

            //info: message callback is registered in onRosterItem callback
        }
开发者ID:crypto-ink,项目名称:CryptoInkLib,代码行数:33,代码来源:XmppManager.cs


示例14: MainForm

        public MainForm(string[] args)
        {
            InitializeComponent();

            logger = LogManager.GetLogger("");
            logger.Log(LogLevel.Info, "Starting up...");

            btnExit.Click += delegate { Exit(); };
            btnMinimize.Click += delegate { ShowHide(); };
            showHideToolStripMenuItem.Click += delegate { ShowHide(); };
            exitToolStripMenuItem.Click += delegate { Exit(); };
            notifyIcon.Text = Program.FullName;

            this.Text = Program.FullName;

            model = new Model(this.components, logger);
            HookModel();
            if (!model.Initialize())
            {
                this.Close();
                //Application.Exit();
            }

            PopulateFolderList();
            if (args.Length > 0)
            {
                if (!model.LoadTorrent(args[0]))
                    errorOnLoad = true;
            }
        }
开发者ID:chitza,项目名称:uDir,代码行数:30,代码来源:MainForm.cs


示例15: DownloadService

 public DownloadService(IProvideDownloadClient downloadClientProvider,
     IEventAggregator eventAggregator, Logger logger)
 {
     _downloadClientProvider = downloadClientProvider;
     _eventAggregator = eventAggregator;
     _logger = logger;
 }
开发者ID:Kiljoymccoy,项目名称:NzbDrone,代码行数:7,代码来源:DownloadService.cs


示例16: CommentsAnalyzerTests

 public CommentsAnalyzerTests()
 {
     this.code = FileUtil.ReadAllText(path);
     this.root = ASTUtil.GetSyntaxTreeFromSource(code).GetRoot();
     this.retriever = RetrieverFactory.GetCommentsRetriever();
     this.logger = NLoggerUtil.GetNLogger(typeof (CommentsAnalyzerTests));
 }
开发者ID:nkcsgexi,项目名称:GhostFactor2,代码行数:7,代码来源:CommentsAnalyzerTests.cs


示例17: IndexerManagerService

 public IndexerManagerService(IContainer c, IConfigurationService config, Logger l, ICacheService cache)
 {
     container = c;
     configService = config;
     logger = l;
     cacheService = cache;
 }
开发者ID:Jackett,项目名称:Jackett,代码行数:7,代码来源:IndexerManagerService.cs


示例18: Page_Load

    protected void Page_Load(object sender, EventArgs e)
    {
        links = Links.Instance;
        gui = GUIVariables.Instance;
        dbOps = DBOperations.Instance;
        categories = Categories.Instance;
        log = Logger.Instance;
        engine = ProcessingEngine.Instance;
        general = General.Instance;
        imageEngine = ImageEngine.Instance;

        seperator = gui.Seperator;

        if (string.IsNullOrEmpty(Request.QueryString["UID"]))
        {

        }
        else
        {
            queryStringUID = Request.QueryString["UID"].Trim().ToLower();
        }

        if (string.IsNullOrEmpty(queryStringUID))
        {

        }
        else
        {
            LoadComments(queryStringUID);
        }
    }
开发者ID:vatsal,项目名称:getputs,代码行数:31,代码来源:Commented.aspx.cs


示例19: Run

 /// <summary>
 ///	Server's main loop implementation.
 /// </summary>
 /// <param name="log"> The Logger instance to be used.</param>
 public void Run( Logger log )
 {
     TcpListener srv = null;
     try
     {
         srv = new TcpListener( IPAddress.Loopback, portNumber );
         srv.Start();
         while ( true )
         {
             log.LogMessage( "Listener - Waiting for connection requests." );
             TcpClient socket = srv.AcceptTcpClient();
             socket.LingerState = new LingerOption( true, 10 );
             log.LogMessage( String.Format( "Listener - Connection established with {0}.",
                                                socket.Client.RemoteEndPoint ) );
                 // Instantiating protocol handler and associate it to the current TCP connection
              _dispatcher.ProcessConnection(socket.GetStream(), log);
              //Handler protocolHandler = new Handler( socket.GetStream(), log );
                 // Synchronously process requests made through de current TCP connection
                 //Task.Factory.StartNew((handler) => ((Handler) handler).Run(), protocolHandler);
                 //protocolHandler.Run();
             Program.ShowInfo( Store.Instance );
         }
     }
     finally
     {
         log.LogMessage( "Listener - Ending." );
         if ( srv != null )
         {
             srv.Stop();
         }
     }
 }
开发者ID:driverpt,项目名称:PC-1112SI,代码行数:36,代码来源:Listener.cs


示例20: Create

        public bool Create(SKNFile file, Logger logger)
        {
            // This function converts the handedness of the DirectX style input data
            // into the handedness OpenGL expects.
            // So, vector inputs have their Z value negated and quaternion inputs have their
            // Z and W values negated.

            List<float> vertexPositions = new List<float>();
            List<float> vertexNormals = new List<float>();
            List<float> vertexTextureCoordinates = new List<float>();

            for (int i = 0; i < file.numVertices; ++i)
            {
                vertexPositions.Add(file.vertices[i].position[0]);
                vertexPositions.Add(file.vertices[i].position[1]);
                vertexPositions.Add(-file.vertices[i].position[2]);

                vertexNormals.Add(file.vertices[i].normal[0]);
                vertexNormals.Add(file.vertices[i].normal[1]);
                vertexNormals.Add(-file.vertices[i].normal[2]);

                vertexTextureCoordinates.Add(file.vertices[i].texCoords[0]);
                vertexTextureCoordinates.Add(file.vertices[i].texCoords[1]);
            }

            List<uint> iData = new List<uint>();
            for (int i = 0; i < numIndices; ++i)
            {
                iData.Add((uint)file.indices[i]);
            }

            return Create(vertexPositions, vertexNormals, vertexTextureCoordinates, iData, logger);
        }
开发者ID:perezale,项目名称:lolmodelviewer,代码行数:33,代码来源:GLStaticModel.cs



注:本文中的Logger类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# LoggerConfiguration类代码示例发布时间:2022-05-24
下一篇:
C# Log_Reports类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap