/** * Return a logger associated with this context. This logger records only those activities within the context and provide a * way to capture the context-specific activities. All log messages are also sent to the system logger, so classes that log * via this mechanism should <i>not</i> also {@link Logger#getLogger(Class) obtain a system logger}. * * @param name the name for the logger * @return the logger, named after <code>clazz</code>; never null * @see #getLogger(Class) */ public Logger getLogger( String name ) { return Logger.getLogger(name); }
/** * Return a logger associated with this context. This logger records only those activities within the context and provide a * way to capture the context-specific activities. All log messages are also sent to the system logger, so classes that log * via this mechanism should <i>not</i> also {@link Logger#getLogger(Class) obtain a system logger}. * * @param clazz the class that is doing the logging * @return the logger, named after <code>clazz</code>; never null * @see #getLogger(String) */ public Logger getLogger( Class<?> clazz ) { return Logger.getLogger(clazz); }
/** * Return a logger associated with this context. This logger records only those activities within the context and provide a * way to capture the context-specific activities. All log messages are also sent to the system logger, so classes that log * via this mechanism should <i>not</i> also {@link Logger#getLogger(Class) obtain a system logger}. * * @param clazz the class that is doing the logging * @return the logger, named after <code>clazz</code>; never null * @see #getLogger(String) */ public Logger getLogger( Class<?> clazz ) { return Logger.getLogger(clazz); }
/** * Return a logger associated with this context. This logger records only those activities within the context and provide a * way to capture the context-specific activities. All log messages are also sent to the system logger, so classes that log * via this mechanism should <i>not</i> also {@link Logger#getLogger(Class) obtain a system logger}. * * @param name the name for the logger * @return the logger, named after <code>clazz</code>; never null * @see #getLogger(Class) */ public Logger getLogger( String name ) { return Logger.getLogger(name); }
/** * Return a logger named corresponding to the class passed as parameter. * * @param clazz the returned logger will be named after clazz * @return logger */ Logger getLogger( Class<?> clazz ) { return Logger.getLogger(clazz.getName()); }
/** * Return a logger named corresponding to the class passed as parameter. * * @param clazz the returned logger will be named after clazz * @return logger */ Logger getLogger( Class<?> clazz ) { return Logger.getLogger(clazz.getName()); }
/** * Return a logger named corresponding to the class passed as parameter. * * @param clazz the returned logger will be named after clazz * @return logger */ Logger getLogger( Class<?> clazz ) { return Logger.getLogger(clazz.getName()); }
protected IndexChangeAdapter( ExecutionContext context, String workspaceName, NodeTypePredicate predicate, ProvidedIndex<?> index ) { super(context, predicate); assert index != null; this.index = index; assert workspaceName != null; this.workspaceName = workspaceName; this.logger = Logger.getLogger(getClass()); }
protected IndexChangeAdapter( ExecutionContext context, String workspaceName, NodeTypePredicate predicate, ProvidedIndex<?> index ) { super(context, predicate); assert index != null; this.index = index; assert workspaceName != null; this.workspaceName = workspaceName; this.logger = Logger.getLogger(getClass()); }
/** * Creates a new logger instance for the underlying class. * * @param clazz a {@link Class} instance; never null * @return a {@link org.modeshape.jcr.api.Logger} implementation */ public static org.modeshape.jcr.api.Logger getLogger(Class<?> clazz) { return new ExtensionLogger(Logger.getLogger(clazz)); }
/** * Creates a new logger instance for the underlying class. * * @param clazz a {@link Class} instance; never null * @return a {@link org.modeshape.jcr.api.Logger} implementation */ public static org.modeshape.jcr.api.Logger getLogger(Class<?> clazz) { return new ExtensionLogger(Logger.getLogger(clazz)); }
protected TikaMimeTypeDetector( Environment environment ) { assert environment != null; this.logger = Logger.getLogger(getClass()); // the extra classpath entry is the package name of the tika extractor, so it can be located inside AS7 (see // RepositoryService) ClassLoader loader = environment.getClassLoader(this, "org.modeshape.extractor.tika"); logger.debug("Initializing mime-type detector..."); initDetector(loader); logger.debug("Successfully initialized detector: {0}", getClass().getName()); }
protected TikaMimeTypeDetector( Environment environment ) { assert environment != null; this.logger = Logger.getLogger(getClass()); // the extra classpath entry is the package name of the tika extractor, so it can be located inside AS7 (see // RepositoryService) ClassLoader loader = environment.getClassLoader(this, "org.modeshape.extractor.tika"); logger.debug("Initializing mime-type detector..."); initDetector(loader); logger.debug("Successfully initialized detector: {0}", getClass().getName()); }
protected AbstractSessionCache(ExecutionContext context, WorkspaceCache sharedWorkspaceCache) { this.logger = Logger.getLogger(getClass()); this.context = context; this.sharedWorkspaceCache = sharedWorkspaceCache; this.workspaceCache.set(sharedWorkspaceCache); ValueFactories factories = this.context.getValueFactories(); this.nameFactory = factories.getNameFactory(); this.pathFactory = factories.getPathFactory(); this.rootPath = this.pathFactory.createRootPath(); }
protected Connectors( JcrRepository.RunningState repository, RepositoryConfiguration.Federation config, Problems problems) { this.repository = repository; this.logger = Logger.getLogger(getClass()); List<Component> components = config.getConnectors(problems); Map<String, List<RepositoryConfiguration.ProjectionConfiguration>> preconfiguredProjections = config.getProjectionsByWorkspace(); Set<String> externalSources = config.getExternalSources(); this.snapshot.set(new Snapshot(components, externalSources, preconfiguredProjections)); }
protected AbstractSessionCache(ExecutionContext context, WorkspaceCache sharedWorkspaceCache) { this.logger = Logger.getLogger(getClass()); this.context = context; this.sharedWorkspaceCache = sharedWorkspaceCache; this.workspaceCache.set(sharedWorkspaceCache); ValueFactories factories = this.context.getValueFactories(); this.nameFactory = factories.getNameFactory(); this.pathFactory = factories.getPathFactory(); this.rootPath = this.pathFactory.createRootPath(); }
protected Connectors( JcrRepository.RunningState repository, RepositoryConfiguration.Federation config, Problems problems) { this.repository = repository; this.logger = Logger.getLogger(getClass()); List<Component> components = config.getConnectors(problems); Map<String, List<RepositoryConfiguration.ProjectionConfiguration>> preconfiguredProjections = config.getProjectionsByWorkspace(); Set<String> externalSources = config.getExternalSources(); this.snapshot.set(new Snapshot(components, externalSources, preconfiguredProjections)); }
private void cleanLocks() { try { lockManager().cleanLocks(); } catch (RepositoryException e) { // This can only happen if the session is not live, which is checked above ... Logger.getLogger(getClass()).error(e, JcrI18n.unexpectedException, e.getMessage()); } }
private void cleanLocks() { try { lockManager().cleanLocks(); } catch (RepositoryException e) { // This can only happen if the session is not live, which is checked above ... Logger.getLogger(getClass()).error(e, JcrI18n.unexpectedException, e.getMessage()); } }
@Before public void beforeEach() { logger = Logger.getLogger(getClass()); // default to an in-memory h2 schematicDb = Schematic.getDb(new TestingEnvironment().defaultPersistenceConfiguration()); schematicDb.start(); TransactionManagerLookup txManagerLookup = new DefaultTransactionManagerLookup(); TransactionManager txManager = txManagerLookup.getTransactionManager(); assertNotNull("Was not able to locate a transaction manager in the test classpath", txManager); repoEnv = new TestRepositoryEnvironment(txManager, schematicDb); }