Search in sources :

Example 1 with LogImpl

use of org.opentosca.toscana.core.transformation.logging.LogImpl in project TOSCAna by StuPro-TOSCAna.

the class LogOverflowIT method testLogOverflow.

@Test
public void testLogOverflow() {
    Log logFactory = new LogImpl(new File(tmpdir, "testlog.log"));
    int i = 1;
    while (i < 5000) {
        i++;
        Logger l = logFactory.getLogger("Logger-" + i);
        if (i % 500 == 0) {
            l.info("Log Message {}", i);
        }
    }
    logFactory.close();
}
Also used : Log(org.opentosca.toscana.core.transformation.logging.Log) LogImpl(org.opentosca.toscana.core.transformation.logging.LogImpl) Logger(org.slf4j.Logger) File(java.io.File) Test(org.junit.Test)

Example 2 with LogImpl

use of org.opentosca.toscana.core.transformation.logging.LogImpl in project TOSCAna by StuPro-TOSCAna.

the class CsarServiceImplIT method setUp.

@Before
public void setUp() throws InvalidCsarException {
    EffectiveModelFactory modelFactory = mock(EffectiveModelFactory.class);
    EffectiveModel model = modelMock();
    when(modelFactory.create(any(Csar.class))).thenReturn(model);
    csarService = new CsarServiceImpl(csarDao);
    Log log = new LogImpl(new File(tmpdir, "log"));
    csar = new CsarImpl(new File(""), identifier, log);
}
Also used : Log(org.opentosca.toscana.core.transformation.logging.Log) LogImpl(org.opentosca.toscana.core.transformation.logging.LogImpl) File(java.io.File) EffectiveModelFactory(org.opentosca.toscana.model.EffectiveModelFactory) EffectiveModel(org.opentosca.toscana.model.EffectiveModel) Before(org.junit.Before)

Aggregations

File (java.io.File)2 Log (org.opentosca.toscana.core.transformation.logging.Log)2 LogImpl (org.opentosca.toscana.core.transformation.logging.LogImpl)2 Before (org.junit.Before)1 Test (org.junit.Test)1 EffectiveModel (org.opentosca.toscana.model.EffectiveModel)1 EffectiveModelFactory (org.opentosca.toscana.model.EffectiveModelFactory)1 Logger (org.slf4j.Logger)1