IronPDF 의 기본 예외 처리
최근 버전의 IronPDF 에서는 로그에 기록되는 네이티브 예외 메시지에 특정 문제 코드( [Issue Code IronPDF-NATIVE-EXCEPTION]) 가 포함됩니다. 그러한 예외 메시지의 예는 아래와 같습니다.
IronPdf.Exceptions.IronPdfNativeException: Error while generating PDF from HTML: 'Error while rendering pdf from html for job group 0: 'Error during dev tools execution: {"method":"Inspector.targetCrashed","params":{}}''.
2024-01-25 08:12:11,960 INFO [Thread-3] [, , , , , , , , ] c.i.i.i.s.Access: [IronPdfEngine] To learn how to solve this issue please read https://ironpdf.com/troubleshooting/ironpdf-native-exception [Issue Code IRONPDF-NATIVE-EXCEPTION]
가능한 원인
IronPDF 네이티브 예외는 일반적으로 IronPDF 의 종속성인 IronPDF 패키지에 사용된 C++ 코드와 관련된 다양한 문제에서 발생하며, 이 패키지는 Chrome PDF 렌더링 엔진을 사용합니다.
해결책
네이티브 예외 관련 문제에 대한 지원을 받으려면 엔지니어링 지원 요청을 제출하고 추가 조사를 위해 전체 로그 파일을 제공해 주십시오.
프로젝트에 다음 코드 조각을 포함하여 네이티브 로깅을 활성화하세요.
// Set the path for the log file.
// This can be a directory name or a specific file path. Here, we set it to "Default.log".
IronPdf.Logging.Logger.LogFilePath = "Default.log";
// Enable logging for all modes to capture comprehensive details
IronPdf.Logging.Logger.LoggingMode = IronPdf.Logging.Logger.LoggingModes.All;
// Set the path for the log file.
// This can be a directory name or a specific file path. Here, we set it to "Default.log".
IronPdf.Logging.Logger.LogFilePath = "Default.log";
// Enable logging for all modes to capture comprehensive details
IronPdf.Logging.Logger.LoggingMode = IronPdf.Logging.Logger.LoggingModes.All;
' Set the path for the log file.
' This can be a directory name or a specific file path. Here, we set it to "Default.log".
IronPdf.Logging.Logger.LogFilePath = "Default.log"
' Enable logging for all modes to capture comprehensive details
IronPdf.Logging.Logger.LoggingMode = IronPdf.Logging.Logger.LoggingModes.All
IronPDF에 의해 생성된 로그 파일은 일반적으로 DLL이 배포된 프로젝트의 /bin 디렉토리에서 찾을 수 있으며, 또는 특정 위치에 로그 파일을 저장하기 위해 사용자 정의 IronPdf.Logging.Logger.LogFilePath을 설정할 수 있습니다. 관련 로그 파일은 다음과 같습니다.
- Default.log : 배포, 스레딩 및 렌더링 프로세스에 대한 정보가 포함되어 있습니다. 프로세스의 동작과 예외 사항을 관찰하는 데 유용합니다.
- cef.log : Chrome Embedded Framework 프로세스에 대한 로그가 포함되어 있습니다.
IronSoftwareEngine.log이 포함될 수도 있습니다. 엔지니어링 지원 요청 시 생성된 모든 로그 파일을 제출해 주십시오.
클라우드 서버의 경우 로그 파일은 특정 디렉터리에 저장될 수 있습니다. Azure 및 AWS 에서 로그 파일을 생성하는 방법에 대한 가이드를 참조하세요.

