Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rename java package and update bundle information #38

Merged
merged 1 commit into from
Jan 24, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 23 additions & 25 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
</license>
</licenses>
<organization>
<name>Eclipse Foundation</name>
<url>https://www.eclipse.org/</url>
<name>Eclipse Trace Compass</name>
<url>https://github.com/eclipse-tracecompass/trace-event-logger</url>
</organization>
<issueManagement>
<url>https://github.com/eclipse-tracecompass/trace-event-logger/issues</url>
Expand All @@ -33,13 +33,11 @@
<artifactId>trace-event-logger</artifactId>
<version>0.1.1</version>
<packaging>jar</packaging>
<name>trace-event-logger</name>
<name>Trace Compass Trace Event Logger</name>
<description>This logger is based on JUL to allow fast JSON traces to be written to disk. It is not lockless or nanosecond precise, but is fast and simple to use and configure.</description>
<!-- the project's website -->
<url>https://eclipse.dev/tracecompass</url>

<url>https://github.com/eclipse-tracecompass/trace-event-logger</url>


<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.8</maven.compiler.source>
Expand Down Expand Up @@ -265,25 +263,25 @@
<plugins>
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<archive>
<manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
</archive>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<executions>
<execution>
<id>bundle-manifest</id>
<phase>process-classes</phase>
<goals>
<goal>manifest</goal>
</goals>
</execution>
</executions>
</plugin>
<configuration>
<archive>
<manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
</archive>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<executions>
<execution>
<id>bundle-manifest</id>
<phase>process-classes</phase>
<goals>
<goal>manifest</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2024 Ericsson
* Copyright (c) 2024, 2025 Ericsson
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the “Software”), to deal
Expand All @@ -22,7 +22,7 @@
* SPDX-License-Identifier: MIT
*******************************************************************************/

package org.eclipse.tracecompass.trace_event_logger;
package org.eclipse.tracecompass.traceeventlogger;

import java.io.IOException;
import java.io.UnsupportedEncodingException;
Expand All @@ -41,7 +41,7 @@
import java.util.logging.LogRecord;
import java.util.logging.StreamHandler;

import org.eclipse.tracecompass.trace_event_logger.LogUtils.TraceEventLogRecord;
import org.eclipse.tracecompass.traceeventlogger.LogUtils.TraceEventLogRecord;

/**
* Asynchronous File Handler for JUL.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2024 Ericsson
* Copyright (c) 2024, 2025 Ericsson
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the “Software”), to deal
Expand All @@ -21,11 +21,11 @@
*
* SPDX-License-Identifier: MIT
*******************************************************************************/
package org.eclipse.tracecompass.trace_event_logger;
package org.eclipse.tracecompass.traceeventlogger;

import java.util.logging.LogRecord;

import org.eclipse.tracecompass.trace_event_logger.LogUtils.TraceEventLogRecord;
import org.eclipse.tracecompass.traceeventlogger.LogUtils.TraceEventLogRecord;

class InnerEvent {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
*
* SPDX-License-Identifier: MIT
*******************************************************************************/
package org.eclipse.tracecompass.trace_event_logger;
package org.eclipse.tracecompass.traceeventlogger;

import java.text.DecimalFormat;
import java.text.Format;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2024 Ericsson
* Copyright (c) 2024, 2025 Ericsson
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the “Software”), to deal
Expand All @@ -21,7 +21,7 @@
*
* SPDX-License-Identifier: MIT
*******************************************************************************/
package org.eclipse.tracecompass.trace_event_logger;
package org.eclipse.tracecompass.traceeventlogger;

import java.io.BufferedWriter;
import java.io.File;
Expand All @@ -40,7 +40,7 @@
import java.util.logging.LogManager;
import java.util.logging.LogRecord;

import org.eclipse.tracecompass.trace_event_logger.LogUtils.TraceEventLogRecord;
import org.eclipse.tracecompass.traceeventlogger.LogUtils.TraceEventLogRecord;

/**
* Snapshot handler, will write to disk in a deferred way. Parameters to
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2024 Ericsson
* Copyright (c) 2024, 2025 Ericsson
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the “Software”), to deal
Expand All @@ -21,7 +21,7 @@
*
* SPDX-License-Identifier: MIT
*******************************************************************************/
package org.eclipse.tracecompass.trace_event_logger;
package org.eclipse.tracecompass.traceeventlogger;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
Expand Down Expand Up @@ -63,7 +63,7 @@ public void after() {
@Test
public void testConfigure() {
try (InputStream fis = new FileInputStream(
new File("./src/test/java/org/eclipse/tracecompass/trace_event_logger/res/logging.properties"))) { //$NON-NLS-1$
new File("./src/test/java/org/eclipse/tracecompass/traceeventlogger/res/logging.properties"))) { //$NON-NLS-1$
LogManager manager = LogManager.getLogManager();
manager.readConfiguration(fis);
Handler first = new AsyncFileHandler(File.createTempFile("test", ".json").getAbsolutePath()); //$NON-NLS-1$ //$NON-NLS-2$
Expand All @@ -81,7 +81,7 @@ public void testConfigure() {
@Test
public void testGoodConfigure() {
try (InputStream fis = new FileInputStream(
new File("./src/test/java/org/eclipse/tracecompass/trace_event_logger/res/goodlogging.properties"))) { //$NON-NLS-1$
new File("./src/test/java/org/eclipse/tracecompass/traceeventlogger/res/goodlogging.properties"))) { //$NON-NLS-1$
LogManager manager = LogManager.getLogManager();
manager.readConfiguration(fis);
Handler first = new AsyncFileHandler(File.createTempFile("test", ".json").getAbsolutePath()); //$NON-NLS-1$ //$NON-NLS-2$
Expand All @@ -104,11 +104,11 @@ public void testGoodConfigure() {
@Test
public void testBadConfigure() throws SecurityException, IOException {
try (InputStream fis = new FileInputStream(
new File("./src/test/java/org/eclipse/tracecompass/trace_event_logger/res/badlogging.properties"))) { //$NON-NLS-1$
new File("./src/test/java/org/eclipse/tracecompass/traceeventlogger/res/badlogging.properties"))) { //$NON-NLS-1$
LogManager manager = LogManager.getLogManager();
try {
manager.readConfiguration(fis);
String prop = manager.getProperty("org.eclipse.tracecompass.trace_event_logger.SnapshotHandler.maxEvents"); //$NON-NLS-1$
String prop = manager.getProperty("org.eclipse.tracecompass.traceeventlogger.SnapshotHandler.maxEvents"); //$NON-NLS-1$
assertNotNull(prop);
} catch (IOException e) {
fail(e.getMessage());
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2024 Ericsson
* Copyright (c) 2024, 2025 Ericsson
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the “Software”), to deal
Expand All @@ -22,7 +22,7 @@
* SPDX-License-Identifier: MIT
*******************************************************************************/

package org.eclipse.tracecompass.trace_event_logger;
package org.eclipse.tracecompass.traceeventlogger;

import java.util.logging.Filter;
import java.util.logging.LogRecord;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
*
* SPDX-License-Identifier: MIT
*******************************************************************************/
package org.eclipse.tracecompass.trace_event_logger;
package org.eclipse.tracecompass.traceeventlogger;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
Expand All @@ -37,9 +37,9 @@
import java.util.logging.SimpleFormatter;
import java.util.logging.StreamHandler;

import org.eclipse.tracecompass.trace_event_logger.LogUtils.FlowScopeLog;
import org.eclipse.tracecompass.trace_event_logger.LogUtils.FlowScopeLogBuilder;
import org.eclipse.tracecompass.trace_event_logger.LogUtils.IFlowScopeLog;
import org.eclipse.tracecompass.traceeventlogger.LogUtils.FlowScopeLog;
import org.eclipse.tracecompass.traceeventlogger.LogUtils.FlowScopeLogBuilder;
import org.eclipse.tracecompass.traceeventlogger.LogUtils.IFlowScopeLog;
import org.junit.Before;
import org.junit.Test;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2024 Ericsson
* Copyright (c) 2024, 2025 Ericsson
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the “Software”), to deal
Expand All @@ -22,7 +22,7 @@
* SPDX-License-Identifier: MIT
*******************************************************************************/

package org.eclipse.tracecompass.trace_event_logger;
package org.eclipse.tracecompass.traceeventlogger;

import java.text.DecimalFormat;
import java.text.Format;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2024 Ericsson
* Copyright (c) 2024, 2025 Ericsson
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the “Software”), to deal
Expand All @@ -21,7 +21,7 @@
*
* SPDX-License-Identifier: MIT
*******************************************************************************/
package org.eclipse.tracecompass.trace_event_logger;
package org.eclipse.tracecompass.traceeventlogger;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
Expand Down Expand Up @@ -197,7 +197,7 @@ public void testEnableDisable() {
@Test
public void testConfigure() {
try (InputStream fis = new FileInputStream(
new File("./src/test/java/org/eclipse/tracecompass/trace_event_logger/res/logging.properties"))) { //$NON-NLS-1$
new File("./src/test/java/org/eclipse/tracecompass/traceeventlogger/res/logging.properties"))) { //$NON-NLS-1$
LogManager manager = LogManager.getLogManager();
manager.readConfiguration(fis);
Handler first = new SnapshotHandler();
Expand All @@ -215,7 +215,7 @@ public void testConfigure() {
@Test
public void testGoodConfigure() {
try (InputStream fis = new FileInputStream(
new File("./src/test/java/org/eclipse/tracecompass/trace_event_logger/res/goodlogging.properties"))) { //$NON-NLS-1$
new File("./src/test/java/org/eclipse/tracecompass/traceeventlogger/res/goodlogging.properties"))) { //$NON-NLS-1$
LogManager manager = LogManager.getLogManager();
manager.readConfiguration(fis);
Handler first = new AsyncFileHandler(File.createTempFile("test", ".json").getAbsolutePath()); //$NON-NLS-1$ //$NON-NLS-2$
Expand Down Expand Up @@ -249,10 +249,10 @@ public void testSimpleBadConfigure() throws SecurityException, IOException {
@Test
public void testBadConfigure() {
try (InputStream fis = new FileInputStream(
new File("./src/test/java/org/eclipse/tracecompass/trace_event_logger/res/badlogging.properties"))) { //$NON-NLS-1$
new File("./src/test/java/org/eclipse/tracecompass/traceeventlogger/res/badlogging.properties"))) { //$NON-NLS-1$
LogManager manager = LogManager.getLogManager();
manager.readConfiguration(fis);
String prop = manager.getProperty("org.eclipse.tracecompass.trace_event_logger.SnapshotHandler.maxEvents"); //$NON-NLS-1$
String prop = manager.getProperty("org.eclipse.tracecompass.traceeventlogger.SnapshotHandler.maxEvents"); //$NON-NLS-1$
assertNotNull(prop);
Handler first = new SnapshotHandler();
first.close();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2024 Ericsson
* Copyright (c) 2024, 2025 Ericsson
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the “Software”), to deal
Expand All @@ -22,7 +22,7 @@
* SPDX-License-Identifier: MIT
*******************************************************************************/

package org.eclipse.tracecompass.trace_event_logger;
package org.eclipse.tracecompass.traceeventlogger;

import static org.junit.Assert.fail;

Expand Down Expand Up @@ -379,7 +379,7 @@ public void testLeanBench() throws SecurityException, IOException {

private static Handler makeAsyncFileHandler(String path) throws IOException {
try (InputStream fis = new FileInputStream(new File(
"./src/test/java/org/eclipse/tracecompass/trace_event_logger/res/benchmarklogging.properties"))) { //$NON-NLS-1$
"./src/test/java/org/eclipse/tracecompass/traceeventlogger/res/benchmarklogging.properties"))) { //$NON-NLS-1$
LogManager manager = LogManager.getLogManager();
manager.readConfiguration(fis);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# MIT License
#
# Copyright (c) 2024 Ericsson
# Copyright (c) 2024, 2025 Ericsson
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
Expand All @@ -23,15 +23,15 @@
# SPDX-License-Identifier: MIT

# used in AsyncFileHandlerTest as well as SnapshotTest
handlers= org.eclipse.tracecompass.trace_event_logger.SnapshotHandler, org.eclipse.tracecompass.trace_event_logger.AsyncFileHandler
handlers= org.eclipse.tracecompass.traceeventlogger.SnapshotHandler, org.eclipse.tracecompass.traceeventlogger.AsyncFileHandler

org.eclipse.tracecompass.trace_event_logger.SnapshotHandler.maxEvents = -1
org.eclipse.tracecompass.trace_event_logger.SnapshotHandler.timeout = -1
org.eclipse.tracecompass.trace_event_logger.SnapshotHandler.filePath =
org.eclipse.tracecompass.trace_event_logger.AsyncFileHandler.maxSize = -1
org.eclipse.tracecompass.trace_event_logger.AsyncFileHandler.queueDepth = -1
org.eclipse.tracecompass.trace_event_logger.AsyncFileHandler.flushRate = -1
org.eclipse.tracecompass.trace_event_logger.AsyncFileHandler.encoding = uTF-6
org.eclipse.tracecompass.trace_event_logger.AsyncFileHandler.filter = coffeeFilter
org.eclipse.tracecompass.trace_event_logger.AsyncFileHandler.errormanager = no thank you
org.eclipse.tracecompass.trace_event_logger.AsyncFileHandler.formatter = LadyGaga
org.eclipse.tracecompass.traceeventlogger.SnapshotHandler.maxEvents = -1
org.eclipse.tracecompass.traceeventlogger.SnapshotHandler.timeout = -1
org.eclipse.tracecompass.traceeventlogger.SnapshotHandler.filePath =
org.eclipse.tracecompass.traceeventlogger.AsyncFileHandler.maxSize = -1
org.eclipse.tracecompass.traceeventlogger.AsyncFileHandler.queueDepth = -1
org.eclipse.tracecompass.traceeventlogger.AsyncFileHandler.flushRate = -1
org.eclipse.tracecompass.traceeventlogger.AsyncFileHandler.encoding = uTF-6
org.eclipse.tracecompass.traceeventlogger.AsyncFileHandler.filter = coffeeFilter
org.eclipse.tracecompass.traceeventlogger.AsyncFileHandler.errormanager = no thank you
org.eclipse.tracecompass.traceeventlogger.AsyncFileHandler.formatter = LadyGaga
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# MIT License
#
# Copyright (c) 2024 Ericsson
# Copyright (c) 2024, 2025 Ericsson
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
Expand All @@ -24,6 +24,6 @@

# used in Benchmarks

org.eclipse.tracecompass.trace_event_logger.AsyncFileHandler.maxSize = 1000
org.eclipse.tracecompass.trace_event_logger.AsyncFileHandler.queueDepth = 100
org.eclipse.tracecompass.trace_event_logger.AsyncFileHandler.flushRate = 100
org.eclipse.tracecompass.traceeventlogger.AsyncFileHandler.maxSize = 1000
org.eclipse.tracecompass.traceeventlogger.AsyncFileHandler.queueDepth = 100
org.eclipse.tracecompass.traceeventlogger.AsyncFileHandler.flushRate = 100
Loading
Loading