protected internal virtual LogService CreateLogService(LogProvider userLogProvider) { long internalLogRotationThreshold = Config.get(GraphDatabaseSettings.store_internal_log_rotation_threshold); long internalLogRotationDelay = Config.get(GraphDatabaseSettings.store_internal_log_rotation_delay).toMillis(); int internalLogMaxArchives = Config.get(GraphDatabaseSettings.store_internal_log_max_archives); //JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final': //ORIGINAL LINE: final org.neo4j.logging.internal.StoreLogService.Builder builder = org.neo4j.logging.internal.StoreLogService.withRotation(internalLogRotationThreshold, internalLogRotationDelay, internalLogMaxArchives, jobScheduler); StoreLogService.Builder builder = StoreLogService.withRotation(internalLogRotationThreshold, internalLogRotationDelay, internalLogMaxArchives, JobScheduler); if (userLogProvider != null) { builder.WithUserLogProvider(userLogProvider); } builder.WithRotationListener(logProvider => DiagnosticsManager.dumpAll(logProvider.getLog(typeof(DiagnosticsManager)))); foreach (string debugContext in Config.get(GraphDatabaseSettings.store_internal_debug_contexts)) { builder.WithLevel(debugContext, Level.DEBUG); } builder.WithDefaultLevel(Config.get(GraphDatabaseSettings.store_internal_log_level)).withTimeZone(Config.get(GraphDatabaseSettings.db_timezone).ZoneId); File logFile = Config.get(store_internal_log_path); if (!logFile.ParentFile.exists()) { logFile.ParentFile.mkdirs(); } StoreLogService logService; try { logService = builder.WithInternalLog(logFile).build(FileSystem); } catch (IOException ex) { throw new Exception(ex); } return(Life.add(logService)); }
public override void DumpToLog() { Diagnostics.dumpAll(); }