Toxocious / Aetherim

A C++ library for accessing Unity's IL2CPP classes, methods, and fields during run-time.
GNU General Public License v3.0
59 stars 15 forks source link

Add log file functionality #10

Open Toxocious opened 11 months ago

Toxocious commented 11 months ago

Aetherim doesn't provide any support for logging data, errors, warnings, etc.

Ideally, we'd use this primarily to handle logging any exceptions that occur during runtime.

When initialized, check for Aetherim.log in the game's root directory.

If it exists: truncate its contents (deleting/recreating the file may be quicker, idk yet) If it doesn't exist: create the file

When we catch any exceptions, ex: if Class->get_field() is called but the field doesn't exist, we log the Image, Namespace, Class, and the name of the field that we tried to get to the logfile.

Example logfile entry:

[Sept. 30, 2023 @ 04:20 AM] Attempted access to non-existent field in Image->Namespace->Class

We can do this for anything, but logs for thrown exceptions are a must.

yekxp commented 11 months ago

Hello, my name is Jakub and I am a student of Technical University in Kosice and software developer in Siemens Healthineers and I would be very happy if I could work on this issue. It would be the part of the course where we have to help a project on GitHub. Could you assign me to it, please?

Toxocious commented 11 months ago

Hey Jakub!

I noticed your other comment on the other issue that you commented on and assigned it to you.

If you would like to do this issue in place of the other one - or do both issues - let me know and I'd glad to assign this issue to you.

yekxp commented 11 months ago

This would be an interesting project for a school subject, where we have to help a GitHub project. I would also make tests for this Logger. I plan to make the logging system scalable, so that logging is possible for other parts of the code. But I would start on both parts next week. Thanks for your permission :) and good luck.

Jakub

Toxocious commented 11 months ago

Excellent!

Completely up to you whether or not you want to integrate tests - I've been, admittedly, too lazy to integrate testing - but do whatever you feel like.

Sounds good though, thanks again for your interest in this project. Looking forward to seeing what you come up with.

Toxocious commented 10 months ago

Let me know if you're still interested in attempting to implement this. @yekxp

Toxocious commented 9 months ago

Began implementation of this in the features/logging branch.