Skip to content

Commit 6c3eea6

Browse files
committed
Merge pull request sineld#25 from serginari/patch-1
errors.md için türkçe doc önerisi
2 parents 4f20052 + 5192772 commit 6c3eea6

File tree

1 file changed

+33
-33
lines changed

1 file changed

+33
-33
lines changed

errors.md

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,94 +1,94 @@
1-
# Errors & Logging
1+
# Hatalar ve Günlüğe Ekleme
22

3-
- [Error Detail](#error-detail)
4-
- [Handling Errors](#handling-errors)
5-
- [HTTP Exceptions](#http-exceptions)
6-
- [Handling 404 Errors](#handling-404-errors)
7-
- [Logging](#logging)
3+
- [Hata Ayrıntısı](#error-detail)
4+
- [Hataların İşlenmesi](#handling-errors)
5+
- [HTTP İstisnaları](#http-exceptions)
6+
- [404 Hatalarının İşlenmesi](#handling-404-errors)
7+
- [Günlüğe Ekleme](#logging)
88

99
<a name="error-detail"></a>
10-
## Error Detail
10+
## Hata Ayrıntısı
1111

12-
By default, error detail is enabled for your application. This means that when an error occurs you will be shown an error page with a detailed stack trace and error message. You may turn off error details by setting the `debug` option in your `app/config/app.php` file to `false`. **It is strongly recommended that you turn off error detail in a production environment.**
12+
Ön tanımlı olarak hata ayrıntısı uygulamanızda etkindir. Yani bir hata oluştuğu zaman ayrıntılı bir sorun listesi ve hata iletisi gösterebileceksiniz. `app/config/app.php` dosyanızdaki `debug` seçeneğini `false` ayarlayarak hata ayrıntılarını devre dışı bırakabilirsiniz. **Bir üretim ortamında hata ayrıntılarını devre dışı bırakmanız kuvvetle önerilir.**
1313

1414
<a name="handling-errors"></a>
15-
## Handling Errors
15+
## Hataların İşlenmesi
1616

17-
By default, the `app/start/global.php` file contains an error handler for all exceptions:
17+
Ön tanımlı olarak, `app/start/global.php` dosyasında tüm istisnalar için bir hata işleyici bulunmaktadır:
1818

1919
App::error(function(Exception $exception)
2020
{
2121
Log::error($exception);
2222
});
2323

24-
This is the most basic error handler. However, you may specify more handlers if needed. Handlers are called based on the type-hint of the Exception they handle. For example, you may create a handler that only handles `RuntimeException` instances:
24+
En temel hata işleyici budur. Ama siz gerektiği kadar işleyici belirleyebilirsiniz. İşleyicilere işledikleri İstisnaların tipine işaret eden isimler verilir. Örneğin, sadece `RuntimeException` olgularını işleyen bir işleyici oluşturabilirsiniz:
2525

2626
App::error(function(RuntimeException $exception)
2727
{
28-
// Handle the exception...
28+
// İstisnayı işle...
2929
});
3030

31-
If an exception handler returns a response, that response will be sent to the browser and no other error handlers will be called:
31+
Bir istisna işleyicisinin bir cevap döndürmesi halinde, bu cevap tarayıcıya gönderilecek ve başka bir hata işleyici çağrılmayacaktır:
3232

3333
App::error(function(InvalidUserException $exception)
3434
{
3535
Log::error($exception);
3636

37-
return 'Sorry! Something is wrong with this account!';
37+
return 'Maalesef bu hesapla ilgili yanlış bir şeyler var!';
3838
});
3939

40-
To listen for PHP fatal errors, you may use the `App::fatal` method:
40+
PHP'nin fatal hatalarını izlemek için, `App::fatal` metodunu kullanabilirsiniz:
4141

4242
App::fatal(function($exception)
4343
{
4444
//
4545
});
4646

4747
<a name="http-exceptions"></a>
48-
## HTTP Exceptions
48+
## HTTP İstisnaları
4949

50-
Exceptions in respect to HTTP, refer to errors that may occur during a client request. This may be a page not found error (404), an unauthorized error (401) or even a generated 500 error. In order to return such a response, use the following:
50+
HTTP istisnaları bir istemci isteği sırasında oluşabilecek hatalar demektir. Bu bir sayfa bulunamadı hatası (404), bir yetkisizlik hatası (401) hatta genel 500 hatası olabilir. Böyle bir cevap döndürmek için aşağıdaki biçimi kullanın:
5151

52-
App::abort(404, 'Page not found');
52+
App::abort(404, 'Sayfa bulunamadı');
5353

54-
The first argument, is the HTTP status code, with the following being a custom message you'd like to show with the error.
54+
Buradaki ilk parametre HTTP durum kodu, ikinci parametre ise bu hata durumunda göstermek istediğiniz özel bir mesajdır.
5555

56-
In order to raise a 401 Unauthorized exception, just do the following:
56+
401 Yetkisizlik istisnası çıkarmak için tek yapacağınız şudur:
5757

58-
App::abort(401, 'You are not authorized.');
58+
App::abort(401, 'Yetkili değilsiniz.');
5959

60-
These exceptions can be executed at any time during the request's lifecycle.
60+
Bu istisnalar, isteğin yaşam döngüsü boyunca her an çalışabilecektir.
6161

6262
<a name="handling-404-errors"></a>
63-
## Handling 404 Errors
63+
## 404 Hatalarının İşlenmesi
6464

65-
You may register an error handler that handles all "404 Not Found" errors in your application, allowing you to return custom 404 error pages:
65+
Uygulamanızdaki tüm "404 Not Found" hatalarını işleyerek özel 404 hata hata sayfaları döndürmenize imkan veren bir hata işleyici kaydı yapabilirsiniz:
6666

6767
App::missing(function($exception)
6868
{
6969
return Response::view('errors.missing', array(), 404);
7070
});
7171

7272
<a name="logging"></a>
73-
## Logging
73+
## Günlüğe Ekleme
7474

75-
The Laravel logging facilities provide a simple layer on top of the powerful [Monolog](http://github.com/seldaek/monolog). By default, Laravel is configured to create daily log files for your application, and these files are stored in `app/storage/logs`. You may write information to these logs like so:
75+
Laravel'in günlüğe ekleme imkanlanları güçlü [Monolog](http://github.com/seldaek/monolog) üstünde basit bir katman sağlar. Laravel, ön tanımlı olarak uygulamanız için günlük dosyaları oluşturacak şekilde yapılandırılmıştır ve bu dosyalar `app/storage/logs` içinde tutulmaktadır. Bu dosyalara aşağıdakilere benzer şekilde bilgi yazabilirsiniz:
7676

77-
Log::info('This is some useful information.');
77+
Log::info('İşte bu yararlı bir bilgidir.');
7878

79-
Log::warning('Something could be going wrong.');
79+
Log::warning('Yanlış giden bir şeyler olabilir.');
8080

81-
Log::error('Something is really going wrong.');
81+
Log::error('Gerçekten yanlış giden bir şey var.');
8282

83-
The logger provides the seven logging levels defined in [RFC 5424](http://tools.ietf.org/html/rfc5424): **debug**, **info**, **notice**, **warning**, **error**, **critical**, and **alert**.
83+
Günlük tutucu, [RFC 5424](http://tools.ietf.org/html/rfc5424)'de tanımlanmış yedi günlük ekleme düzeyi sağlamaktadır: **debug**, **info**, **notice**, **warning**, **error**, **critical** ve **alert**.
8484

85-
Monolog has a variety of additional handlers you may use for logging. If needed, you may access the underlying Monolog instance being used by Laravel:
85+
Monolog, günlüğe ekleme için kullanabileceğiniz bir takım başka işleyicilere de sahiptir. Gerektiğinde, Laravel tarafından kullanılan Monolog olgusuna şu şekilde ulaşabilirsiniz:
8686

8787
$monolog = Log::getMonolog();
8888

89-
You may also register an event to catch all messages passed to the log:
89+
Ayrıca, günlüğe geçirilen tüm mesajları yakalamak için bir olay kaydı da yapabilirsiniz:
9090

91-
**Registering A Log Listener**
91+
**Bir günlük izleyici kaydı yapılması**
9292

9393
Log::listen(function($level, $message, $context)
9494
{

0 commit comments

Comments
 (0)