---
type: archive
area: archive
status: archived
date: 2026-05-03
created: 2026-05-03
updated: 1980-01-01
tags:
  - archive
---
- Every Log level includes level from the top to it.
- We we set a log level to a specific one if we do change it in some other method. It will not change and the log message will be ignored.
- Logs Destinations:
	- Console
	- File
	- Memory
	- Socket
	- Stream
	- 
- Log Handler write log in specific destination.
- Child logger can override the log level from parent.
- The Java Logging API allows for different log levels to be applied to different log targets, enabling flexible logging configurations. It is not required for each class to use a separate logger object, and log messages can be written to multiple log targets simultaneously. Additionally, log levels follow a hierarchical structure, and setting the log level to INFO includes SEVERE messages as well.
### Exception:
- **<mark style="background: #FF5582A6;">Throwable</mark>** class is the main class behind all exceptions

![[img-20240815-192305-cea0b8b1.png]]

- **Checked Exceptions**: Because there is an error in the code 
- **Runtime Exceptions:** Because represent genuine problems that the program may encounter and must be caught.
- Any class that extends **Runtime Exceptions** are **Runtime Exception** and any class that extends **Exception** are **Checked Exceptions**.
- When Throwing the program is stopped if the Exception is not Handled.
- Finally is executed always regardless if exceptions occur or not.
### Auto-Closure
- There is some classes in java that implements AutoCloseable Interafce so we don't need to do finally block automatically generate finally close and try  (here we instanciate vars).

![[img-20240815-230106-d5934123.png]]

- Asssertion tests we should define a boolean expression to test an espression

![[img-20240815-232137-520b4136.png]]
- When a function throws an exception the code after it is not executed
- If the exception is not intercepted the rest of the method is not executed
- Inside a try {} block if a method throws an exception the rest of catch block is not executed 
- return inside catch block mean that we will not execute the rest if the method except the finally block is executed always.
- 