Get-AzContainerInstanceLog
지정된 리소스 그룹 및 컨테이너 그룹에서 지정된 컨테이너 인스턴스에 대한 로그를 가져옵니다.
Syntax
Get-AzContainerInstanceLog
-ContainerGroupName <String>
-ContainerName <String>
-ResourceGroupName <String>
[-SubscriptionId <String[]>]
[-Tail <Int32>]
[-Timestamp]
[-DefaultProfile <PSObject>]
[<CommonParameters>]
Description
지정된 리소스 그룹 및 컨테이너 그룹에서 지정된 컨테이너 인스턴스에 대한 로그를 가져옵니다.
예제
예제 1: 컨테이너 인스턴스의 비상 로그 가져오기
Get-AzContainerInstanceLog -ContainerGroupName test-cg -ContainerName test-container -ResourceGroupName test-rg
/docker-entrypoint.sh: /docker-entrypoint.d/ is not empty, will attempt to perform configuration
/docker-entrypoint.sh: Looking for shell scripts in /docker-entrypoint.d/
/docker-entrypoint.sh: Launching /docker-entrypoint.d/10-listen-on-ipv6-by-default.sh
10-listen-on-ipv6-by-default.sh: info: Getting the checksum of /etc/nginx/conf.d/default.conf
10-listen-on-ipv6-by-default.sh: info: Enabled listen on IPv6 in /etc/nginx/conf.d/default.conf
/docker-entrypoint.sh: Launching /docker-entrypoint.d/20-envsubst-on-templates.sh
/docker-entrypoint.sh: Launching /docker-entrypoint.d/30-tune-worker-processes.sh
/docker-entrypoint.sh: Configuration complete; ready for start up
컨테이너 그룹 test-cg의 test-container에서 로그를 가져옵니다. 기본적으로 최대 4MB의 로그 콘텐츠를 반환합니다.
예제 2: 컨테이너 인스턴스의 비상 2줄 로그 가져오기
Get-AzContainerInstanceLog -ContainerGroupName test-cg -ContainerName test-container -ResourceGroupName test-rg -Tail 2
/docker-entrypoint.sh: Launching /docker-entrypoint.d/30-tune-worker-processes.sh
/docker-entrypoint.sh: Configuration complete; ready for start up
컨테이너 그룹 test-cg의 test-container에서 비상 2줄의 로그를 가져옵니다.
매개 변수
-ContainerGroupName
컨테이너 그룹의 이름입니다.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ContainerName
컨테이너 인스턴스의 이름입니다.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DefaultProfile
DefaultProfile 매개 변수가 작동하지 않습니다. 다른 구독에 대해 cmdlet을 실행하는 경우 사용 가능한 경우 SubscriptionId 매개 변수를 사용합니다.
Type: | PSObject |
Aliases: | AzureRMContext, AzureCredential |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ResourceGroupName
리소스 그룹의 이름입니다.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-SubscriptionId
Microsoft Azure 구독을 고유하게 식별하는 구독 자격 증명입니다. 구독 ID는 모든 서비스 호출에 대한 URI의 파트를 형성합니다.
Type: | String[] |
Position: | Named |
Default value: | (Get-AzContext).Subscription.Id |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Tail
컨테이너 인스턴스 로그의 꼬리에서 표시할 줄 수입니다. 제공되지 않으면 사용 가능한 모든 로그가 최대 4mb까지 표시됩니다.
Type: | Int32 |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Timestamp
true이면 모든 로그 출력 줄의 시작 부분에 타임스탬프를 추가합니다. 제공되지 않으면 기본값은 false입니다.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
출력
참고
별칭