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

FileAppender support is missing #4

Open
Eccenux opened this issue Feb 6, 2024 · 0 comments
Open

FileAppender support is missing #4

Eccenux opened this issue Feb 6, 2024 · 0 comments

Comments

@Eccenux
Copy link

Eccenux commented Feb 6, 2024

I liked the converter. It mostly did it's job well. FileAppender support is missing though (or at least it didn't work in my case).

	<appender name="file" class="org.apache.log4j.FileAppender">
		<param name="file" value="file4testing.log" />
		<param name="append" value="true" />
		<layout class="org.apache.log4j.PatternLayout">
			<param name="ConversionPattern" value="%d{yyyy-MM-dd HH:mm:ss.SSSS} %-5p: %c{3}.%m%n" />
		</layout>
	</appender>

Exception is thrown and appended in the output XML. So it is easy to find invalid files (better then silently failing I guess). You can comment out FileAppender and convert it manually.

BTW. GPT can convert short log4j files, but it seems to change patterns in some weird ways (or it did for me). So YYMV.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant